console
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>生日快乐,卢佳彤同学</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
width: 100%;
height: 100%;
background: #ececec;
color: #111;
font-family: "Helvetica Neue", "Arial", sans-serif;
overflow: hidden;
}
.page {
position: fixed;
inset: 0;
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 28px;
animation: fade 0.8s ease both;
}
.page.active {
display: flex;
}
@keyframes fade {
from { opacity: 0; transform: translateY(10px); }
to { opacity: 1; transform: translateY(0); }
}
.korean-deco {
position: absolute;
font-size: 11px;
letter-spacing: 4px;
color: #777;
}
.deco-top { top: 28px; left: 28px; }
.deco-bottom { bottom: 28px; right: 28px; }
.line {
width: 42px;
height: 1px;
background: #111;
margin: 22px 0;
}
/* 第一页 文字页 */
.title-box {
text-align: center;
}
.title-en {
font-weight: 400;
font-size: 14px;
letter-spacing: 10px;
color: #555;
margin-bottom: 18px;
}
.title-cn {
font-weight: 700;
font-size: 36px;
letter-spacing: 8px;
line-height: 1.5;
}
.title-sub {
display: block;
margin-top: 14px;
font-size: 12px;
letter-spacing: 6px;
color: #888;
font-weight: 400;
}
.korean-quote {
margin-top: 30px;
font-size: 13px;
color: #666;
letter-spacing: 3px;
text-align: center;
line-height: 1.9;
}
/* ========== 第二页:自定义图片区域 ========== */
.img-wrap {
width: 86%;
max-width: 420px;
display: flex;
align-items: center;
justify-content: center;
}
.cake-img {
width: 100%;
border-radius: 28px;
/* 如果你想要彩色,删掉下面这一行 filter */
filter: grayscale(100%) contrast(1.05);
box-shadow: 0 24px 55px rgba(0, 0, 0, 0.18);
}
.tip-text{
color:#999;
font-size:12px;
margin-bottom:12px;
}
.cake-caption {
margin-top: 28px;
font-size: 12px;
letter-spacing: 6px;
color: #444;
text-align: center;
}
.cake-caption b {
font-weight: 600;
color: #111;
}
/* 第三页 廊坊天气 */
.date-card {
width: 86%;
max-width: 340px;
background: #1a1a1a;
color: #f7f7f7;
border-radius: 24px;
padding: 36px 28px;
box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}
.date-label {
font-size: 11px;
letter-spacing: 5px;
color: #999;
}
.date-full {
margin-top: 14px;
font-size: 30px;
line-height: 1.4;
}
.date-week {
margin-top: 8px;
font-size: 14px;
color: #bbb;
letter-spacing: 2px;
}
.weather-row {
margin-top: 24px;
display: flex;
align-items: center;
justify-content: space-between;
padding-top: 20px;
border-top: 1px solid #333;
}
.weather-icon {
font-size: 34px;
}
.weather-info {
text-align: right;
}
.weather-temp {
font-size: 26px;
}
.weather-text {
margin-top: 4px;
font-size: 12px;
color: #bbb;
letter-spacing: 2px;
}
/* 第四页 情话页 + 雨滴容器 */
.love-text {
text-align: center;
z-index: 2;
}
.love-main {
font-size: 26px;
letter-spacing: 4px;
line-height: 1.8;
}
.love-sub {
margin-top: 24px;
font-size: 13px;
color: #666;
letter-spacing: 3px;
}
.rain-wrap {
position: absolute;
inset: 0;
overflow: hidden;
pointer-events: none;
z-index: 1;
}
.drop {
position: absolute;
width: 1px;
height: 16px;
background: #b8b8b8;
opacity: 0.45;
animation: fall linear infinite;
}
@keyframes fall {
0% { transform: translateY(-20px); }
100% { transform: translateY(100vh); }
}
.wish {
margin-top: 30px;
font-size: 13px;
letter-spacing: 4px;
color: #333;
text-align: center;
line-height: 1.8;
}
.dots {
position: fixed;
bottom: 90px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 10px;
z-index: 40;
}
.dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #bbb;
transition: 0.3s;
}
.dot.active {
background: #111;
width: 18px;
border-radius: 999px;
}
.nav {
position: fixed;
bottom: 30px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 14px;
z-index: 50;
}
.nav button {
border: 1px solid #111;
background: transparent;
color: #111;
padding: 10px 16px;
border-radius: 999px;
font-size: 12px;
letter-spacing: 3px;
cursor: pointer;
transition: 0.3s;
}
.nav button:hover {
background: #111;
color: #ececec;
}
</style>
</head>
<body>
<!-- Page1 文字页 -->
<section class="page active" id="page1">
<span class="korean-deco deco-top">LU JIATONG · BIRTHDAY</span>
<div class="title-box">
<div class="title-en">HAPPY BIRTHDAY</div>
<div class="title-cn">
生日快乐
<span class="title-sub">卢 佳 彤 同 学</span>
</div>
</div>
<div class="line"></div>
<p class="korean-quote">
오늘은 당신의 날<br />
今天是你的日子
</p>
<span class="korean-deco deco-bottom">BLACK & WHITE · MINIMAL</span>
</section>
<!-- Page2 ✅ 自定义图片页,你自己换图 -->
<section class="page" id="page2">
<span class="korean-deco deco-top">CAKE · BIRTHDAY</span>
<div class="img-wrap">
<!-- 👉 在这里修改src,填入你的图片链接 -->
<img class="cake-img" alt="蛋糕" src="这里换成你的图片地址">
</div>
<p class="cake-caption">
<b>오늘의 케이크</b>|今日蛋糕
</p>
<span class="korean-deco deco-bottom">MONOCHROME · MOMENT</span>
</section>
<!-- Page3 廊坊天气 -->
<section class="page" id="page3">
<span class="korean-deco deco-top">LANGFANG · TODAY WEATHER</span>
<div class="date-card">
<div class="date-label">HEBEI LANGFANG</div>
<div class="date-full">2026.11.07</div>
<div class="date-week">SATURDAY</div>
<div class="weather-row">
<div class="weather-icon">🌧️</div>
<div class="weather-info">
<div class="weather-temp">3℃</div>
<div class="weather-text">LIGHT RAIN</div>
</div>
</div>
</div>
<p class="wish">今日廊坊 · 小雨</p>
<span class="korean-deco deco-bottom">WEATHER RECORD</span>
</section>
<!-- Page4 情话页 下雨动画 -->
<section class="page" id="page4">
<div class="rain-wrap" id="rainBox"></div>
<span class="korean-deco deco-top">WITH YOU</span>
<div class="love-text">
<div class="love-main">
只要和你在一起<br>
下雨也是好天气
</div>
<div class="love-sub">함께라면 비가 와도 좋아</div>
</div>
<div class="line"></div>
<span class="korean-deco deco-bottom">MY LOVE MINE ALL MINE</span>
</section>
<div class="dots" id="dots">
<div class="dot active" data-page="0"></div>
<div class="dot" data-page="1"></div>
<div class="dot" data-page="2"></div>
<div class="dot" data-page="3"></div>
</div>
<div class="nav">
<button onclick="prevPage()">上一页</button>
<button onclick="goPage(0)">1</button>
<button onclick="goPage(1)">2</button>
<button onclick="goPage(2)">3</button>
<button onclick="goPage(3)">4</button>
<button onclick="nextPage()">下一页</button>
</div>
<script>
const pages = document.querySelectorAll(".page");
const dots = document.querySelectorAll(".dot");
let current = 0;
function showPage(index) {
pages.forEach((p, i) => {
p.classList.toggle("active", i === index);
});
dots.forEach((d, i) => {
d.classList.toggle("active", i === index);
});
current = index;
}
function nextPage() {
if (current < pages.length - 1) showPage(current + 1);
}
function prevPage() {
if (current > 0) showPage(current - 1);
}
function goPage(n) {
showPage(n);
}
dots.forEach(dot => {
dot.addEventListener("click", () => {
const n = parseInt(dot.dataset.page);
showPage(n);
});
});
// 滑动切换
let startX = 0;
document.addEventListener("touchstart", e => { startX = e.touches[0].clientX; });
document.addEventListener("touchend", e => {
const endX = e.changedTouches[0].clientX;
if (startX - endX > 50) nextPage();
if (endX - startX > 50) prevPage();
});
// 雨滴
const rainBox = document.getElementById("rainBox");
function createRain() {
for(let i=0; i<60; i++){
const drop = document.createElement("div");
drop.className = "drop";
drop.style.left = Math.random()*100 + "%";
drop.style.animationDuration = (0.6 + Math.random()*0.7) + "s";
drop.style.animationDelay = Math.random()*2 + "s";
rainBox.appendChild(drop);
}
}
createRain();
</script>
</body>
</html>