Files
Doomsday_Survival_Manual/out_app_html/login/index.html

324 lines
9.6 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>末日求生 - 登录</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Microsoft YaHei', '微软雅黑', sans-serif;
background: linear-gradient(135deg, #2d1b0e 0%, #4a2c18 50%, #6b390f 100%);
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
position: relative;
overflow: hidden;
}
/* 背景效果 */
.background-debris {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.debris-particle {
position: absolute;
background: rgba(255, 107, 0, 0.3);
border-radius: 50%;
animation: fall linear infinite;
}
@keyframes fall {
0% { transform: translateY(-100vh) rotate(0deg); opacity: 0; }
10% { opacity: 0.8; }
90% { opacity: 0.5; }
100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}
/* 登录容器 */
.login-container {
position: relative;
z-index: 10;
width: 90%;
max-width: 400px;
background: rgba(255, 86, 0, 0.1);
backdrop-filter: blur(10px);
border: 3px solid #ff8c3a;
border-radius: 15px;
padding: 40px 30px;
box-shadow:
0 0 20px rgba(255, 107, 0, 0.5),
inset 0 0 30px rgba(0, 0, 0, 0.3);
}
/* 破损边框效果 */
.login-container::before {
content: '';
position: absolute;
top: -10px;
right: -10px;
width: 50px;
height: 50px;
border-top: 3px solid #ff8c3a;
border-right: 3px solid #ff8c3a;
}
.login-container::after {
content: '';
position: absolute;
bottom: -10px;
left: -10px;
width: 50px;
height: 50px;
border-bottom: 3px solid #ff8c3a;
border-left: 3px solid #ff8c3a;
}
/* 标题 */
.login-title {
text-align: center;
color: #fff;
font-size: 28px;
font-weight: bold;
margin-bottom: 10px;
text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
}
.login-title::before {
content: '🔥';
display: inline-block;
margin-right: 10px;
}
/* 输入框 */
.input-group {
position: relative;
margin-bottom: 25px;
}
.input-label {
display: block;
color: #ffcc99;
font-size: 14px;
margin-bottom: 8px;
text-align: left;
padding-left: 10px;
}
.input-field {
width: 100%;
padding: 15px 15px 15px 45px;
background: rgba(0, 0, 0, 0.6);
border: 2px solid #ff8c3a;
border-radius: 8px;
color: #fff;
font-size: 16px;
transition: all 0.3s ease;
}
.input-field:focus {
outline: none;
box-shadow:
0 0 15px rgba(255, 107, 0, 0.6),
inset 0 0 10px rgba(255, 86, 0, 0.3);
}
/* 输入框图标 */
.input-icon {
position: absolute;
left: 15px;
top: 50%;
transform: translateY(-50%);
color: #ff8c3a;
font-size: 20px;
}
/* 登录按钮 */
.login-btn {
width: 100%;
padding: 16px;
background: linear-gradient(180deg, #ff8c3a 0%, #ff5e00 100%);
border: none;
border-radius: 10px;
color: #fff;
font-size: 18px;
font-weight: bold;
cursor: pointer;
box-shadow:
0 5px 20px rgba(255, 94, 0, 0.6),
inset 0 2px 5px rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
}
.login-btn:hover {
transform: translateY(-2px);
box-shadow:
0 8px 30px rgba(255, 94, 0, 0.8),
inset 0 2px 5px rgba(255, 255, 255, 0.4);
}
.login-btn:active {
transform: translateY(1px);
}
/* 底部链接 */
.footer-links {
display: flex;
justify-content: space-between;
margin-top: 25px;
}
.footer-link {
color: #ffcc99;
text-decoration: none;
font-size: 14px;
transition: all 0.3s ease;
}
.footer-link:hover {
color: #fff;
text-shadow: 0 0 10px rgba(255, 204, 153, 0.8);
}
/* 装饰元素 */
.decoration-line {
height: 2px;
background: linear-gradient(90deg, transparent 0%, #ff8c3a 50%, transparent 100%);
margin: 20px 0;
}
/* 闪烁效果 */
.glow-effect {
animation: glow 2s ease-in-out infinite alternate;
}
@keyframes glow {
from { box-shadow: 0 0 10px rgba(255, 107, 0, 0.3); }
to { box-shadow: 0 0 30px rgba(255, 107, 0, 0.8); }
}
/* 响应式适配 */
@media (max-width: 480px) {
.login-container {
width: 95%;
padding: 30px 20px;
}
.login-title {
font-size: 24px;
}
}
</style>
</head>
<body>
<div class="background-debris" id="debris-container"></div>
<div class="login-container">
<h1 class="login-title glow-effect">末日求生</h1>
<form id="loginForm">
<div class="input-group">
<label class="input-label">用户名</label>
<input type="text" class="input-field" placeholder="请输入您的幸存者编号" required>
<span class="input-icon">📝</span>
</div>
<div class="input-group">
<label class="input-label">密码</label>
<input type="password" class="input-field" placeholder="请输入您的生存密码" required>
<span class="input-icon">🔒</span>
</div>
<button type="submit" class="login-btn glow-effect">立即求生</button>
</form>
<div class="decoration-line"></div>
<div class="footer-links">
<a href="#" class="footer-link">忘记密码?</a>
<a href="#" class="footer-link">注册新幸存者</a>
</div>
</div>
<script>
$(document).ready(function() {
// 创建背景碎片效果
function createDebris() {
const debrisContainer = $('#debris-container');
setInterval(() => {
const particle = $('<div>')
.addClass('debris-particle')
.css({
left: Math.random() * 100 + '%',
width: (Math.random() * 20 + 5) + 'px',
height: (Math.random() * 20 + 5) + 'px',
animationDuration: (Math.random() * 3 + 2) + 's'
});
debrisContainer.append(particle);
setTimeout(() => {
particle.remove();
}, 5000);
}, 100);
}
createDebris();
// 登录表单提交处理
$('#loginForm').on('submit', function(e) {
e.preventDefault();
const username = $('.input-field:first').val().trim();
const password = $('.input-field:last').val().trim();
if (!username || !password) {
alert('请填写完整信息,幸存者!');
return;
}
// 模拟登录验证
$('#loginForm').find('.login-btn')
.html('<span class="loading">求生中...</span>')
.prop('disabled', true);
setTimeout(() => {
alert(`欢迎,${username}\n已接入末日生存系统`);
// 跳转到首页
window.location.href = '../home/index.html';
}, 1500);
});
// 输入框聚焦效果
$('.input-field').on('focus', function() {
$(this).siblings('.input-icon')
.css({
'transform': 'translateY(-50%) translateY(2px)',
'opacity': '1'
});
});
$('.input-field').on('blur', function() {
$(this).siblings('.input-icon')
.css({
'transform': 'translateY(-50%) translateY(-2px)',
'opacity': '0.7'
});
});
});
</script>
</body>
</html>