用H5写一个带样式的登录页面
时间: 2024-05-20 16:14:01 浏览: 7
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<style>
body {
background-color: #f1f1f1;
}
.container {
margin-top: 50px;
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
width: 400px;
margin: 0 auto;
}
h1 {
text-align: center;
font-weight: bold;
font-size: 36px;
color: #333;
margin-bottom: 30px;
}
label {
font-weight: bold;
font-size: 18px;
color: #333;
display: block;
margin-bottom: 10px;
}
input[type="text"], input[type="password"] {
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
width: 100%;
margin-bottom: 20px;
font-size: 16px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
border: none;
padding: 10px;
font-size: 18px;
border-radius: 5px;
cursor: pointer;
width: 100%;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<div class="container">
<h1>Login</h1>
<form>
<label for="username">Username</label>
<input type="text" id="username" name="username" placeholder="Enter your username" required>
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Enter your password" required>
<input type="submit" value="Login">
</form>
</div>
</body>
</html>