美化界面<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>注册</title> </head> <body> <h1>注册</h1> <form action="/Register" method="post"> <label for="username">用户名:</label> <input type="text" name="username" id="username" required><br> <label for="password">密码:</label> <input type="password" name="password" id="password" required><br> <input type="submit" value="注册"> <a href="/login.html">已注册,去登录</a> </form> </body> </html>
时间: 2023-06-27 15:02:34 浏览: 43
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>注册</title>
<style>
body {
background-color: #f2f2f2;
font-family: Arial, sans-serif;
}
h1 {
text-align: center;
margin-top: 50px;
color: #333;
}
form {
margin: 0 auto;
width: 400px;
background-color: #fff;
padding: 20px;
border-radius: 5px;
box-shadow: 0px 0px 10px #ccc;
margin-top: 50px;
}
label {
display: block;
margin-bottom: 10px;
color: #555;
}
input[type="text"],
input[type="password"] {
width: 100%;
padding: 10px;
border: none;
background-color: #f7f7f7;
margin-bottom: 20px;
border-radius: 5px;
box-shadow: inset 0px 1px 3px #ccc;
font-size: 16px;
color: #555;
}
input[type="submit"] {
background-color: #333;
color: #fff;
padding: 10px 20px;
border-radius: 5px;
border: none;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
}
a {
display: block;
text-align: center;
margin-top: 20px;
color: #555;
text-decoration: none;
}
a:hover {
color: #333;
}
</style>
</head>
<body>
<h1>注册</h1>
<form action="/Register" method="post">
<label for="username">用户名:</label>
<input type="text" name="username" id="username" required>
<label for="password">密码:</label>
<input type="password" name="password" id="password" required>
<input type="submit" value="注册">
<a href="/login.html">已注册,去登录</a>
</form>
</body>
</html>
这是一个简单的 HTML 页面,我在原有代码的基础上添加了 CSS 样式,使得页面更加美观。您可以将这段代码复制到您的HTML文件中,或者在您的样式表中添加这些样式。
相关推荐
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![html](https://img-home.csdnimg.cn/images/20210720083451.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)