生成一个关于登录的html页面,要美观大方
时间: 2024-03-23 17:44:02 浏览: 9
好的,我可以提供一份基本的登录页面的HTML代码,您可以根据需要进行修改和美化。
```html
<!DOCTYPE html>
<html>
<head>
<title>登录页面</title>
<style>
body {
background-color: #f1f1f1;
font-family: Arial, Helvetica, sans-serif;
}
.container {
background-color: #ffffff;
border: 1px solid #ccc;
border-radius: 5px;
box-shadow: 0 0 5px #ccc;
margin: 150px auto;
padding: 20px;
width: 400px;
}
h1 {
text-align: center;
}
input[type=text], input[type=password] {
border-radius: 3px;
box-sizing: border-box;
font-size: 16px;
margin: 10px 0;
padding: 10px;
width: 100%;
}
button[type=submit] {
background-color: #4CAF50;
border: none;
border-radius: 3px;
color: white;
cursor: pointer;
font-size: 16px;
margin-top: 20px;
padding: 10px;
width: 100%;
}
button[type=submit]:hover {
background-color: #45a049;
}
.signup {
margin-top: 20px;
text-align: center;
}
.signup a {
color: #4CAF50;
text-decoration: none;
}
</style>
</head>
<body>
<div class="container">
<h1>登录</h1>
<form action="#" method="post">
<label for="username"><b>用户名</b></label>
<input type="text" placeholder="请输入用户名" name="username" required>
<label for="password"><b>密码</b></label>
<input type="password" placeholder="请输入密码" name="password" required>
<button type="submit">登录</button>
</form>
<div class="signup">
<p>没有账号? <a href="#">立即注册</a></p>
</div>
</div>
</body>
</html>
```
这是一个简单的登录页面,其中包括用户名和密码输入框以及登录按钮。您可以根据需要修改样式和内容。