写一个美化的html登录界面
时间: 2023-10-16 21:27:37 浏览: 22
好的,下面是一个简单的HTML登录界面代码:
```
<!DOCTYPE html>
<html>
<head>
<title>美化登录界面</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
form {
background-color: #fff;
border-radius: 10px;
padding: 20px;
width: 300px;
margin: 0 auto;
margin-top: 50px;
box-shadow: 0px 0px 10px rgba(0,0,0,0.3);
}
input[type="text"], input[type="password"] {
padding: 10px;
width: 100%;
box-sizing: border-box;
border-radius: 5px;
border: none;
margin-bottom: 10px;
}
input[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
width: 100%;
font-size: 16px;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
h1 {
text-align: center;
color: #4CAF50;
margin-top: 0;
}
</style>
</head>
<body>
<form>
<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>
```
希望对你有所帮助!现在,我能为您解决什么问题呢?