写一个登陆页面html
时间: 2023-10-23 18:08:55 浏览: 72
登录页面html
<!DOCTYPE html>
<html>
<head>
<title>登陆页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
font-size: 16px;
line-height: 1.6;
padding: 0;
margin: 0;
}
.container {
max-width: 500px;
margin: 0 auto;
padding: 20px;
box-sizing: border-box;
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
h1 {
font-size: 28px;
font-weight: 600;
text-align: center;
color: #333;
margin: 0 0 20px;
}
form {
display: flex;
flex-direction: column;
align-items: center;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: none;
border-radius: 5px;
box-shadow: 0 0 5px rgba(0,0,0,0.2);
}
input[type="submit"] {
width: 100%;
padding: 10px;
margin: 10px 0;
border: none;
border-radius: 5px;
background-color: #333;
color: #fff;
font-size: 16px;
font-weight: 600;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #555;
}
</style>
</head>
<body>
<div class="container">
<h1>登陆</h1>
<form action="#" method="post">
<label for="username">用户名</label>
<input type="text" id="username" name="username" required>
<label for="password">密码</label>
<input type="password" id="password" name="password" required>
<input type="submit" value="登陆">
</form>
</div>
</body>
</html>
阅读全文