用HTML制作一个登录页面
时间: 2024-05-24 17:11:33 浏览: 12
<!DOCTYPE html>
<html>
<head>
<title>登录页面</title>
<meta charset="utf-8">
<style type="text/css">
body{
background-color: #f5f5f5;
font-family: Arial, sans-serif;
}
form{
background-color: #fff;
border: 1px solid #ccc;
box-shadow: 0 0 10px #ccc;
margin: 100px auto;
padding: 20px;
width: 400px;
}
h1{
font-size: 24px;
margin-bottom: 20px;
text-align: center;
}
label{
display: block;
font-size: 14px;
margin-bottom: 5px;
}
input[type="text"], input[type="password"]{
border: 1px solid #ccc;
font-size: 14px;
padding: 5px;
width: 100%;
}
input[type="submit"]{
background-color: #007bff;
border: none;
color: #fff;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
padding: 10px;
width: 100%;
}
input[type="submit"]:hover{
background-color: #0069d9;
}
</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>
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)