请帮我写一个带样式带验证码的html页面
时间: 2024-06-03 12:09:22 浏览: 11
好的,以下是一个带样式带验证码的html页面:
<!DOCTYPE html>
<html>
<head>
<title>带样式带验证码的页面</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
font-size: 14px;
}
h1 {
color: #333333;
text-align: center;
margin-top: 50px;
}
form {
width: 400px;
margin: 0 auto;
background-color: #ffffff;
padding: 20px;
border: 1px solid #cccccc;
border-radius: 5px;
box-shadow: 0px 0px 10px #cccccc;
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 5px;
margin-bottom: 20px;
}
img {
display: block;
margin: 0 auto;
margin-bottom: 20px;
border: 1px solid #cccccc;
border-radius: 5px;
padding: 5px;
}
input[type="submit"] {
background-color: #333333;
color: #ffffff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #555555;
}
</style>
</head>
<body>
<h1>带样式带验证码的页面</h1>
<form>
<label>用户名:</label>
<input type="text" name="username" placeholder="请输入用户名">
<label>密码:</label>
<input type="password" name="password" placeholder="请输入密码">
<label>验证码:</label>
<img src="verification_code.jpg" alt="验证码">
<input type="text" name="verification_code" placeholder="请输入验证码">
<input type="submit" value="登陆">
</form>
</body>
</html>
注:验证码图片需通过后端生成,这里只是示例。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)