生成html登陆界面代码
时间: 2023-10-19 08:08:33 浏览: 36
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
}
form {
background-color: #fff;
border: 1px solid #ccc;
padding: 20px;
max-width: 400px;
margin: 50px auto;
}
h1 {
font-size: 24px;
margin: 0 0 20px;
text-align: center;
}
label {
display: block;
margin-bottom: 10px;
font-size: 16px;
font-weight: bold;
}
input[type="text"], input[type="password"] {
padding: 10px;
border: 1px solid #ccc;
font-size: 16px;
width: 100%;
margin-bottom: 20px;
box-sizing: border-box;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
border: none;
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
margin-bottom: 10px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form action="#" method="post">
<h1>Login</h1>
<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>
</body>
</html>