完成任务16:编写 04_长期发展/环境保护.md

This commit is contained in:
root
2026-05-23 16:51:48 +00:00
parent 33ea0114ea
commit c8cd92ba7c
734 changed files with 188060 additions and 604 deletions

View File

@@ -0,0 +1,387 @@
<!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;
color: #fff;
}
/* 顶部导航栏 */
.top-nav {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 60px;
background: rgba(255, 86, 0, 0.3);
backdrop-filter: blur(10px);
border-bottom: 2px solid #ff8c3a;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
z-index: 1000;
}
.nav-logo {
font-size: 20px;
font-weight: bold;
color: #ffcc99;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
.nav-tabs {
display: flex;
gap: 15px;
}
.tab-item {
padding: 8px 16px;
background: rgba(255, 107, 0, 0.3);
border: 2px solid #ff8c3a;
border-radius: 20px;
color: #fff;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.tab-item.active {
background: linear-gradient(180deg, #ff8c3a 0%, #ff5e00 100%);
box-shadow:
0 4px 15px rgba(255, 94, 0, 0.6),
inset 0 2px 5px rgba(255, 255, 255, 0.3);
}
.tab-item:hover {
transform: translateY(-2px);
box-shadow:
0 6px 20px rgba(255, 94, 0, 0.8),
inset 0 2px 5px rgba(255, 255, 255, 0.4);
}
/* 内容区域 */
.content-container {
padding-top: 70px;
padding-bottom: 30px;
}
/* 帖子/视频卡片 */
.card-grid {
display: grid;
gap: 20px;
padding: 15px;
}
.skill-card {
background: rgba(255, 86, 0, 0.1);
border: 3px solid #ff8c3a;
border-radius: 15px;
overflow: hidden;
box-shadow:
0 4px 20px rgba(255, 94, 0, 0.4),
inset 0 0 20px rgba(0, 0, 0, 0.3);
}
.card-image {
width: 100%;
height: 200px;
background: linear-gradient(180deg, #4a2c18 0%, #6b390f 100%);
display: flex;
align-items: center;
justify-content: center;
position: relative;
overflow: hidden;
}
.card-image::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: repeating-linear-gradient(
45deg,
rgba(255, 107, 0, 0.1),
rgba(255, 107, 0, 0.1) 10px,
transparent 10px,
transparent 20px
);
}
.card-image::after {
content: '';
position: absolute;
top: -50%;
left: -50%;
width: 200%;
height: 200%;
background: conic-gradient(
transparent,
rgba(255, 107, 0, 0.3) 10%,
transparent 20%
);
animation: rotate 4s linear infinite;
}
@keyframes rotate {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.card-content {
padding: 20px;
}
.card-title {
font-size: 18px;
font-weight: bold;
color: #ffcc99;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}
.card-description {
font-size: 14px;
color: #ffcc99;
line-height: 1.6;
margin-bottom: 15px;
}
.card-meta {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 10px;
border-top: 2px solid rgba(255, 107, 0, 0.3);
}
.card-author {
font-size: 12px;
color: #ff8c3a;
}
.card-view-count {
font-size: 12px;
color: #ffcc99;
}
/* 底部标签页 */
.bottom-tabs {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 70px;
background: rgba(255, 86, 0, 0.3);
backdrop-filter: blur(10px);
border-top: 2px solid #ff8c3a;
display: flex;
justify-content: space-around;
align-items: center;
z-index: 1000;
}
.tab-item {
padding: 15px 20px;
background: rgba(255, 86, 0, 0.3);
border: 2px solid #ff8c3a;
border-radius: 25px;
color: #fff;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
}
.tab-item.active {
background: linear-gradient(180deg, #ff8c3a 0%, #ff5e00 100%);
box-shadow:
0 4px 15px rgba(255, 94, 0, 0.6),
inset 0 2px 5px rgba(255, 255, 255, 0.3);
}
.tab-item:hover {
transform: translateY(-2px);
box-shadow:
0 6px 20px rgba(255, 94, 0, 0.8),
inset 0 2px 5px rgba(255, 255, 255, 0.4);
}
/* 加载动画 */
.loading {
display: inline-block;
width: 30px;
height: 30px;
border: 3px solid rgba(255, 107, 0, 0.3);
border-top-color: #ff8c3a;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* 响应式适配 */
@media (max-width: 480px) {
.card-grid {
padding: 10px;
}
.card-image {
height: 150px;
}
}
</style>
</head>
<body>
<!-- 顶部导航栏 -->
<nav class="top-nav">
<div class="nav-logo">🔥末日求生</div>
<div class="nav-tabs">
<div class="tab-item active">首页</div>
<div class="tab-item">背包</div>
<div class="tab-item">我的</div>
</div>
</nav>
<!-- 内容区域 -->
<div class="content-container" id="mainContent">
<div class="card-grid" id="skillCards">
<!-- 技能卡片将通过 JavaScript 动态生成 -->
</div>
</div>
<!-- 底部标签页 -->
<div class="bottom-tabs">
<div class="tab-item active">首页</div>
<div class="tab-item">背包</div>
<div class="tab-item">我的</div>
</div>
<script>
$(document).ready(function() {
// 模拟技能数据
const skills = [
{
title: "火种采集与保存",
description: "学习如何在末日环境中安全地收集火种,并掌握多种保存方法。从简单的木炭到复杂的油灯技术,让你的生存之火永不熄灭。",
views: "12.5 万次观看",
author: "幸存者老张"
},
{
title: "净水系统搭建",
description: "在缺水环境下,掌握制作简易净水器、收集雨水和净化水源的技巧。让你的每一口水都干净可饮。",
views: "8.3 万次观看",
author: "净水专家"
},
{
title: "食物储存与加工",
description: "学习如何保存食物,制作简易罐头、腌制食品,以及利用野外资源获取营养。让你的胃在末日中也能得到满足。",
views: "15.2 万次观看",
author: "美食大师"
},
{
title: "庇护所建造技巧",
description: "从临时掩体到坚固住所,学习利用周围材料搭建安全、舒适的生存空间。让你的末日生活更有尊严。",
views: "20.1 万次观看",
author: "建筑大师"
},
{
title: "急救与创伤处理",
description: "掌握基本的急救知识,学会处理伤口、骨折和常见疾病。在医疗资源匮乏的末日,你的技能就是救命稻草。",
views: "18.7 万次观看",
author: "急救专家"
},
{
title: "武器制作与使用",
description: "学习利用周围材料制作简易武器,掌握狩猎技巧。在必要时保护自己和他人的生存能力。",
views: "25.3 万次观看",
author: "猎户之星"
}
];
// 生成技能卡片
function createSkillCards() {
const container = $('#skillCards');
skills.forEach((skill, index) => {
const card = $(`
<div class="card">
<div class="card-image"></div>
<div class="card-content">
<h3 class="card-title">${index + 1}. ${skill.title}</h3>
<p class="card-description">${skill.description}</p>
<div class="card-meta">
<span class="card-author">${skill.author}</span>
<span class="card-view-count">${skill.views}</span>
</div>
</div>
</div>
`);
container.append(card);
});
}
// 创建技能卡片
createSkillCards();
// 标签页切换效果
$('.tab-item').on('click', function() {
$('.tab-item').removeClass('active');
$(this).addClass('active');
const tabName = $(this).text();
if (tabName === '首页') {
$('#mainContent').show();
} else if (tabName === '背包') {
window.location.href = '../bag/index.html';
} else if (tabName === '我的') {
window.location.href = '../profile/index.html';
}
});
// 模拟加载更多内容
function loadMoreSkills() {
const container = $('#skillCards');
setTimeout(() => {
const newCard = $(`
<div class="card">
<div class="card-image"></div>
<div class="card-content">
<h3 class="card-title">6. 新技能加载中...</h3>
<p class="card-description">更多生存技巧正在更新中,敬请期待。</p>
<div class="card-meta">
<span class="card-author">系统</span>
<span class="card-view-count">加载中</span>
</div>
</div>
</div>
`);
container.append(newCard);
}, 2000);
}
// 加载更多技能
loadMoreSkills();
});
</script>
</body>
</html>