使用HTML制作账户安全界面
时间: 2023-09-17 17:10:25 浏览: 73
好的,以下是一个简单的账户安全界面的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 {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
margin-top: 50px;
}
form {
width: 400px;
margin: 50px auto;
padding: 20px;
background-color: #fff;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
label {
display: block;
margin-bottom: 10px;
font-weight: bold;
}
input[type="password"] {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 3px;
box-sizing: border-box;
}
button {
display: block;
width: 100%;
padding: 10px;
margin-top: 20px;
background-color: #4CAF50;
color: #fff;
border: none;
border-radius: 3px;
cursor: pointer;
}
</style>
</head>
<body>
<h1>账户安全</h1>
<form>
<label for="password">当前密码:</label>
<input type="password" id="password" name="password" required>
<label for="new_password">新密码:</label>
<input type="password" id="new_password" name="new_password" required>
<label for="confirm_password">确认密码:</label>
<input type="password" id="confirm_password" name="confirm_password" required>
<button type="submit">保存</button>
</form>
</body>
</html>
```
这个界面包括了一个标题(h1),一个表单(form)和三个密码输入框(input[type="password"]),以及一个提交按钮(button)。其中,每个输入框都有相应的标签(label),并且都是必填项(required)。还添加了一些简单的CSS样式,以使界面看起来更美观。