html设计一个网站 有登录界面
时间: 2024-05-14 19:18:01 浏览: 15
好的,下面是一个简单的 HTML 登录界面设计:
```html
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
}
form {
margin: 50px auto;
width: 300px;
background-color: #fff;
padding: 20px;
border-radius: 5px;
}
h1 {
text-align: center;
margin-bottom: 30px;
}
input[type=text], input[type=password] {
width: 100%;
margin-bottom: 20px;
padding: 10px;
border: none;
border-radius: 5px;
background-color: #f2f2f2;
}
input[type=submit] {
background-color: #4CAF50;
color: #fff;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type=submit]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<h1>登录</h1>
<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>
</body>
</html>
```
这是一个简单的登录界面,包括用户名和密码输入框以及登录按钮。你可以根据需要进行修改和美化。