用html写一个背景为科幻风格的登录注册页面
时间: 2024-05-27 10:11:56 浏览: 8
<!DOCTYPE html>
<html>
<head>
<title>科幻风格登录注册页面</title>
<style>
body {
background-image: url("https://cdn.pixabay.com/photo/2016/01/19/17/48/sci-fi-1156794_960_720.jpg");
background-size: cover;
background-repeat: no-repeat;
background-position: center;
font-family: Arial, sans-serif;
color: #fff;
}
form {
background-color: rgba(0,0,0,0.7);
padding: 20px;
border-radius: 10px;
margin: 100px auto;
max-width: 500px;
}
input[type=text], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
border-radius: 4px;
cursor: pointer;
width: 100%;
}
button:hover {
background-color: #45a049;
}
h1 {
text-align: center;
margin-bottom: 50px;
}
</style>
</head>
<body>
<form>
<h1>科幻世界</h1>
<label for="username">用户名</label>
<input type="text" id="username" name="username" placeholder="请输入用户名">
<label for="password">密码</label>
<input type="password" id="password" name="password" placeholder="请输入密码">
<button type="submit">登录</button>
<p>还没有账号? <a href="#">注册</a></p>
</form>
</body>
</html>
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)