120 lines
2.5 KiB
HTML
120 lines
2.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>登录页面</title>
|
|
<link rel="stylesheet" href="style.css">
|
|
</head>
|
|
<body>
|
|
|
|
<div class="login-wrap">
|
|
<div class="login-container">
|
|
<h2 class="login-title">欢迎登录</h2>
|
|
<form action="/your-login-processing-url" method="post">
|
|
<div class="input-field">
|
|
<i class="fas fa-user icon"></i>
|
|
<input type="text" id="username" name="username" placeholder="用户名" required>
|
|
</div>
|
|
<div class="input-field">
|
|
<i class="fas fa-lock icon"></i>
|
|
<input type="password" id="password" name="password" placeholder="密码" required>
|
|
</div>
|
|
<button type="submit" class="login-btn">登录</button>
|
|
<p class="signup-link">还没有账号?<a href="#">立即注册</a></p>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|
|
|
|
<style>
|
|
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');
|
|
|
|
body, html {
|
|
height: 100%;
|
|
margin: 0;
|
|
font-family: 'Roboto', sans-serif;
|
|
background-image: linear-gradient(to right, #f0f2f5, #dfe4ea);
|
|
}
|
|
|
|
.login-wrap {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
height: 100%;
|
|
}
|
|
|
|
.login-container {
|
|
width: 100%;
|
|
max-width: 400px;
|
|
padding: 30px;
|
|
background-color: white;
|
|
border-radius: 10px;
|
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.login-title {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
color: #333;
|
|
}
|
|
|
|
.input-field {
|
|
position: relative;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.input-field input {
|
|
width: 100%;
|
|
padding: 15px 20px 15px 45px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 5px;
|
|
outline: none;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.input-field input:focus {
|
|
border-color: #0099cc;
|
|
}
|
|
|
|
.icon {
|
|
position: absolute;
|
|
top: 50%;
|
|
left: 15px;
|
|
transform: translateY(-50%);
|
|
color: #aaa;
|
|
}
|
|
|
|
.login-btn {
|
|
width: 100%;
|
|
padding: 15px;
|
|
background-color: #0099cc;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
font-size: 16px;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.login-btn:hover {
|
|
background-color: #0077aa;
|
|
}
|
|
|
|
.signup-link {
|
|
text-align: center;
|
|
margin-top: 20px;
|
|
color: #777;
|
|
}
|
|
|
|
.signup-link a {
|
|
color: #0099cc;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.signup-link a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
</style> |