+182
@@ -0,0 +1,182 @@
|
||||
/* ===========================================
|
||||
1. 通用响应式底座 (所有样式均需依赖)
|
||||
=========================================== */
|
||||
:root {
|
||||
--text-color: #333;
|
||||
--paper-bg: #fff;
|
||||
--wish-color: #333;
|
||||
--border-color: #ddd;
|
||||
--font-family-base: "Noto Serif SC", serif;
|
||||
--font-family-sig: "Noto Serif SC", serif; /* 默认署名字体 */
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
background-color: #f6f6f6; /* 默认外背景 */
|
||||
font-family: var(--font-family-base);
|
||||
color: var(--text-color);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
transition: background 0.3s;
|
||||
}
|
||||
|
||||
/* 自适应容器 */
|
||||
.letter-container {
|
||||
width: 100%;
|
||||
max-width: 800px;
|
||||
min-height: 85vh;
|
||||
padding: 5% 7%;
|
||||
box-sizing: border-box;
|
||||
position: relative;
|
||||
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
|
||||
background-color: var(--paper-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
/* 手机端适配 */
|
||||
@media (max-width: 600px) {
|
||||
body { padding: 10px; }
|
||||
.letter-container { padding: 35px 20px; }
|
||||
}
|
||||
|
||||
/* 传统书信格式公共逻辑 */
|
||||
.salutation {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 0;
|
||||
margin-bottom: 1.5rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.content p {
|
||||
text-indent: 2em; /* 首行缩进 */
|
||||
line-height: 1.8;
|
||||
text-align: justify;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.closing { margin-top: 2.5rem; }
|
||||
.wish-prefix { text-indent: 2em; margin: 0; color: var(--wish-color); }
|
||||
.wish-suffix { font-weight: bold; margin-top: 5px; color: var(--wish-color); }
|
||||
|
||||
.footer {
|
||||
text-align: right;
|
||||
margin-top: 4rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.signature {
|
||||
font-size: 1.1em;
|
||||
font-family: var(--font-family-sig);
|
||||
}
|
||||
|
||||
/* ===========================================
|
||||
2. 原始场景皮肤 (Modern, Traditional, Vintage)
|
||||
=========================================== */
|
||||
/* ... (保留你之前的定义,此处略以节省空间,直接写新的) ... */
|
||||
.theme-modern { --paper-bg: #fff; border-top: 4px solid #333; }
|
||||
.theme-traditional { --paper-bg: #fdfaf2; writing-mode: vertical-rl; height: 650px; }
|
||||
@media (max-width: 600px) { .theme-traditional { writing-mode: horizontal-tb; height: auto; } }
|
||||
.theme-vintage { --paper-bg: #fff; border: 2px solid #b71c1c; background-image: repeating-linear-gradient(transparent, transparent 31px, rgba(183, 28, 28, 0.1) 31px, rgba(183, 28, 28, 0.1) 32px); line-height: 32px; --text-color: #b71c1c; --wish-color: #b71c1c; }
|
||||
|
||||
|
||||
/* ===========================================
|
||||
3. [新增] 青春与多样场景皮肤
|
||||
=========================================== */
|
||||
|
||||
/* --- A. 青春派对 (Youthful) --- */
|
||||
/* 特点:明亮多彩、活力、柔和 */
|
||||
.theme-youth {
|
||||
--paper-bg: #fff;
|
||||
--text-color: #4a4a4a;
|
||||
--wish-color: #ff6b6b; /* 鲜艳的颜色 */
|
||||
--border-color: #ffe0e0;
|
||||
font-family: "PingFang SC", "Microsoft YaHei", sans-serif; /* 使用现代无衬线字体 */
|
||||
|
||||
border-radius: 15px; /* 圆角增加亲和力 */
|
||||
border: 3px solid #ffe0e0;
|
||||
}
|
||||
|
||||
/* 装饰:顶部和底部加点彩色条纹 */
|
||||
.theme-youth::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0; left: 0; right: 0; height: 8px;
|
||||
background: linear-gradient(90deg, #ff6b6b, #feca57, #48dbfb, #ff9f43);
|
||||
border-radius: 15px 15px 0 0;
|
||||
}
|
||||
|
||||
.theme-youth .salutation { color: #222; }
|
||||
.theme-youth .content p { text-indent: 0; text-align: left; background-color: #fcfcfc; padding: 10px; border-radius: 8px; margin-bottom: 1.2rem; } /* 类似气泡感 */
|
||||
.theme-youth .wish-prefix { text-indent: 0; padding-left: 1rem; } /* 青春风不一定强制缩进 */
|
||||
.theme-youth .wish-suffix { font-weight: 800; font-size: 1.1rem; }
|
||||
.theme-youth .footer { color: #888; }
|
||||
.theme-youth .signature { color: #333; font-weight: bold; }
|
||||
|
||||
|
||||
/* --- B. 青葱校园 (Campus) --- */
|
||||
/* 特点:数学格子纸、怀旧、清爽蓝调 */
|
||||
.theme-campus {
|
||||
--paper-bg: #fdfdfd;
|
||||
--text-color: #3e3e3e;
|
||||
--wish-color: #2980b9; /* 校园蓝 */
|
||||
--border-color: #87ceeb;
|
||||
font-family: "SimSun", serif; /* 怀旧宋体 */
|
||||
|
||||
/* 模拟蓝格子纸 */
|
||||
background-image:
|
||||
linear-gradient(rgba(135, 206, 235, 0.3) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(135, 206, 235, 0.3) 1px, transparent 1px);
|
||||
background-size: 25px 25px; /* 格子大小 */
|
||||
}
|
||||
|
||||
/* 顶部加一个类似书签或校徽的圆 */
|
||||
.theme-campus::after {
|
||||
content: "CAMPUS";
|
||||
position: absolute;
|
||||
top: -15px; right: 30px;
|
||||
background-color: #2980b9;
|
||||
color: white;
|
||||
padding: 5px 15px;
|
||||
border-radius: 20px;
|
||||
font-size: 0.8rem;
|
||||
font-family: sans-serif;
|
||||
}
|
||||
|
||||
.theme-campus .content p { line-height: 1.6; text-indent: 2em; }
|
||||
.theme-campus .closing { border-top: 1px dashed rgba(135, 206, 235, 0.5); padding-top: 1rem; }
|
||||
.theme-campus .footer .date { color: #888; }
|
||||
|
||||
|
||||
/* --- C. 极简和风 (Wabi-Sabi / Minimalist) --- */
|
||||
/* 特点:淡雅、素净、极低对比度、高端商务或长辈 */
|
||||
.theme-wabi {
|
||||
--paper-bg: #fafafa;
|
||||
--text-color: #555;
|
||||
--wish-color: #777;
|
||||
--border-color: transparent; /* 无边框 */
|
||||
font-family: "Source Han Serif SC", serif; /* 高质量宋体 */
|
||||
|
||||
background-color: #fff;
|
||||
padding: 8% 10%; /* 更宽松的内边距 */
|
||||
border-radius: 0;
|
||||
box-shadow: none; /* 去掉阴影,极度扁平 */
|
||||
}
|
||||
|
||||
/* 手机端去掉过于宽松的内边距 */
|
||||
@media (max-width: 600px) {
|
||||
.theme-wabi { padding: 40px 20px; }
|
||||
}
|
||||
|
||||
/* 装饰:只在底部加一条极淡的灰线 */
|
||||
.theme-wabi .footer {
|
||||
text-align: right;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
padding-top: 1.5rem;
|
||||
}
|
||||
|
||||
.theme-wabi .salutation { font-weight: normal; font-size: 1.2rem; color: #333; }
|
||||
.theme-wabi .content p { text-indent: 2em; line-height: 2; color: #666; font-size: 0.95rem; }
|
||||
.theme-wabi .wish-suffix { font-weight: normal; color: #777; }
|
||||
.theme-wabi .signature { font-family: "Zhi Mang Xing", cursive; font-size: 1.8rem; color: #333; } /* 使用Google Font书法字体 */
|
||||
Reference in New Issue
Block a user