写一个背景是酷炫星空的登录页html
时间: 2023-10-11 12:08:02 浏览: 52
很高兴为您服务!关于您的问题,我可以提供以下示例代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>酷炫星空登录页</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
body{
background-color: #111;
background-image: url('https://cdn.pixabay.com/photo/2018/03/27/18/16/stars-3272074__340.jpg');
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
font-family: Arial, sans-serif;
font-size: 16px;
color: #fff;
padding: 0;
margin: 0;
}
form{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-top: 200px;
text-align: center;
}
input[type="text"], input[type="password"]{
padding: 10px;
margin: 10px;
width: 300px;
border-radius: 20px;
border: none;
outline: none;
font-size: 18px;
background-color: rgba(255, 255, 255, 0.2);
color: #fff;
}
input[type="submit"]{
padding: 10px;
margin: 10px;
width: 200px;
border-radius: 20px;
border: none;
outline: none;
font-size: 18px;
background-color: #00ffff;
color: #111;
cursor: pointer;
}
</style>
</head>
<body>
<form>
<h1>欢迎登录酷炫星空</h1>
<input type="text" placeholder="请输入用户名">
<input type="password" placeholder="请输入密码">
<input type="submit" value="登录">
</form>
</body>
</html>
```
这个登录页的背景是一张酷炫的星空图片,登录表单的样式也非常简洁明了。如果您需要修改样式或添加其他元素,可以根据上述代码进行修改。
希望这个回答能够帮到您,如果您还有其他问题,欢迎随时向我提问!