|
<!DOCTYPE html>
|
<html lang="zh">
|
|
<head>
|
<meta charset="UTF-8">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<title>用户登录</title>
|
<style>
|
body {
|
font-family: "宋体", Arial, Helvetica, sans-serif;
|
background-color: #FEEFE3;
|
background-image: url("https://i.imgur.com/9NyJSkH.jpg");
|
background-size: 800px;
|
background-repeat: no-repeat;
|
background-position: center top;
|
}
|
|
* {
|
box-sizing: border-box;
|
}
|
|
/* Add padding to container elements */
|
.container {
|
padding: 20px;
|
background-color: rgba(255, 255, 255, 0.8);
|
border-radius: 20px;
|
width: 380px;
|
margin: auto;
|
margin-top: 15vh;
|
box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.2);
|
}
|
|
/* Full-width input fields */
|
input[type=text],
|
input[type=password] {
|
width: 100%;
|
padding: 12px 20px;
|
margin: 8px 0;
|
display: inline-block;
|
border: none;
|
background-color: #FEEFE3;
|
border-radius: 8px;
|
font-size: 18px;
|
}
|
|
/* Set a style for the submit button */
|
button {
|
background-color: #F53A20;
|
color: white;
|
padding: 16px 20px;
|
margin: 20px 0;
|
border: none;
|
cursor: pointer;
|
width: 100%;
|
border-radius: 8px;
|
font-size: 24px;
|
letter-spacing: 2px;
|
}
|
|
/* Set a hover effect for the submit button */
|
button:hover {
|
opacity: 0.8;
|
}
|
|
/* Center the login form */
|
.login-form {
|
text-align: center;
|
font-size: 24px;
|
margin-bottom: 20px;
|
}
|
|
/* Add a red border to invalid inputs */
|
input:invalid {
|
border-color: #E91E63;
|
}
|
|
/* Style for the heading */
|
h1 {
|
font-size: 48px;
|
color: #F53A20;
|
text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
|
text-align: center;
|
margin-top: 80px;
|
}
|
|
/* Style for the input labels */
|
label {
|
font-size: 24px;
|
color: #FFC400;
|
display: block;
|
text-align: left;
|
margin-bottom: 8px;
|
letter-spacing: 2px;
|
}
|
|
/* Style for the error message */
|
.error {
|
color: #E91E63;
|
font-size: 18px;
|
text-align: left;
|
margin-top: 8px;
|
}
|
</style>
|
</head>
|
|
<body>
|
|
<h1>中国风登录页面</h1>
|
|
<form class="login-form" action="" method="post">
|
<div class="container">
|
<label for="username">用户名</label>
|
<input type="text" placeholder="请输入用户名" name="username" required>
|
|
<label for="password">密码</label>
|
<input type="password" placeholder="请输入密码" name="password" required>
|
|
<button type="submit">登录</button>
|
<div class="error">用户名或密码错误</div>
|
</div>
|
</form>
|
|
</body>
|
|
</html>
|