写一个渲染好样式的登陆注册功能的HTML页面
时间: 2024-03-26 10:42:20 浏览: 21
好的,以下是一个简单的登陆注册功能的HTML页面,带有基本的样式渲染:
```
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login/Register</title>
<style>
body {
background-color: #F5F5F5;
font-family: Arial, sans-serif;
}
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
}
.form {
background-color: #FFFFFF;
padding: 20px;
border-radius: 10px;
box-shadow: 0px 0px 10px 0px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 400px;
}
h1 {
margin-bottom: 20px;
}
input[type=text], input[type=password] {
padding: 10px;
margin: 10px;
border: none;
border-radius: 5px;
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
width: 100%;
box-sizing: border-box;
}
button[type=submit] {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
margin: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.2);
width: 100%;
box-sizing: border-box;
}
button[type=submit]:hover {
background-color: #3E8E41;
}
</style>
</head>
<body>
<div class="container">
<form class="form">
<h1>Login</h1>
<label for="username">Username:</label>
<input type="text" id="username" name="username">
<label for="password">Password:</label>
<input type="password" id="password" name="password">
<button type="submit">Submit</button>
</form>
<form class="form">
<h1>Register</h1>
<label for="new-username">New Username:</label>
<input type="text" id="new-username" name="new-username">
<label for="new-password">New Password:</label>
<input type="password" id="new-password" name="new-password">
<label for="confirm-password">Confirm Password:</label>
<input type="password" id="confirm-password" name="confirm-password">
<button type="submit">Submit</button>
</form>
</div>
</body>
</html>
```
这个页面包括了一个登陆表单和一个注册表单,每个表单都有一个标题、用户名和密码输入框、以及一个提交按钮。整个页面的背景色是淡灰色,表单的背景色是白色,有圆角和阴影。输入框和按钮都有基本的样式,当鼠标悬停在提交按钮上时,按钮的背景色会变成深绿色。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)