帮我写一个HTML登陆页面
时间: 2023-03-31 07:05:09 浏览: 91
好的,我可以为您提供一个HTML登陆页面的代码,您可以将其复制并粘贴到您的项目中:
```html
<!DOCTYPE html>
<html>
<head>
<title>登陆页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.">
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
form {
background-color: #ffffff;
border: 1px solid #cccccc;
border-radius: 5px;
box-shadow: px px 10px #cccccc;
margin: 50px auto;
padding: 20px;
width: 300px;
}
input[type="text"], input[type="password"] {
border: 1px solid #cccccc;
border-radius: 5px;
box-sizing: border-box;
display: block;
font-size: 16px;
margin-bottom: 10px;
padding: 10px;
width: 100%;
}
input[type="submit"] {
background-color: #4CAF50;
border: none;
border-radius: 5px;
color: #ffffff;
cursor: pointer;
font-size: 16px;
padding: 10px;
width: 100%;
}
input[type="submit"]:hover {
background-color: #3e8e41;
}
</style>
</head>
<body>
<form>
<h2>登陆</h2>
<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)