模板:Playground styles:修订间差异
来自RIA | Wiki
更多操作
创建页面,内容为“→============================================================ TemplateStyles — playground_styles.css 目标:展示 MediaWiki CSS-only 交互与视觉的各种可能性 约束:MediaWiki 1.39 TemplateStyles 白名单内属性 ============================================================: →── 全局重置 ──: .pg-page { width: 100%; font-size: 15px; line-height: 1.65; color: #1f2328; } .pg-page * { box-sizing…” |
无编辑摘要 |
||
| (未显示同一用户的5个中间版本) | |||
| 第141行: | 第141行: | ||
line-height: 1.1; | line-height: 1.1; | ||
margin-top: 6px; | margin-top: 6px; | ||
color: #5a4fcf; | |||
} | } | ||
| 第343行: | 第340行: | ||
} | } | ||
/* 默认高亮第一个 tab */ | /* 默认高亮第一个 tab — 使用 $= 结尾匹配(MediaWiki 生成完整路径 href) */ | ||
.pg-page .pg-tabbar a[href="#pg-tab-a"] { | .pg-page .pg-tabbar a[href$="#pg-tab-a"] { | ||
background: #f0f5ff; | background: #f0f5ff; | ||
border-bottom-color: #0984e3; | border-bottom-color: #0984e3; | ||
| 第365行: | 第362行: | ||
/* 重置默认 tab 高亮 */ | /* 重置默认 tab 高亮 */ | ||
.pg-page #pg-tab-b:target~.pg-tabbar a[href="#pg-tab-a"], | .pg-page #pg-tab-b:target~.pg-tabbar a[href$="#pg-tab-a"], | ||
.pg-page #pg-tab-c:target~.pg-tabbar a[href="#pg-tab-a"] { | .pg-page #pg-tab-c:target~.pg-tabbar a[href$="#pg-tab-a"] { | ||
background: transparent; | background: transparent; | ||
border-bottom-color: transparent; | border-bottom-color: transparent; | ||
| 第373行: | 第370行: | ||
/* 激活对应 tab 高亮 */ | /* 激活对应 tab 高亮 */ | ||
.pg-page #pg-tab-b:target~.pg-tabbar a[href="#pg-tab-b"] { | .pg-page #pg-tab-b:target~.pg-tabbar a[href$="#pg-tab-b"] { | ||
background: #f5f0ff; | background: #f5f0ff; | ||
border-bottom-color: #6c5ce7; | border-bottom-color: #6c5ce7; | ||
| 第379行: | 第376行: | ||
} | } | ||
.pg-page #pg-tab-c:target~.pg-tabbar a[href="#pg-tab-c"] { | .pg-page #pg-tab-c:target~.pg-tabbar a[href$="#pg-tab-c"] { | ||
background: #f0faf6; | background: #f0faf6; | ||
border-bottom-color: #00b894; | border-bottom-color: #00b894; | ||
| 第1,155行: | 第1,152行: | ||
.pg-page .pg-hero-title { | .pg-page .pg-hero-title { | ||
font-size: 1.8em; | font-size: 1.8em; | ||
} | |||
.pg-page .pg-pattern-item { | |||
flex-basis: 100%; | |||
} | |||
.pg-page .pg-compare-col { | |||
flex-basis: 100%; | |||
} | |||
.pg-page .pg-masonry { | |||
column-count: 1; | |||
} | |||
} | |||
/* ============================================================ | |||
16. CSS 计数器步骤条 (Stepper) | |||
============================================================ */ | |||
.pg-page .pg-stepper { | |||
counter-reset: pg-step; | |||
padding: 0; | |||
} | |||
.pg-page .pg-step { | |||
counter-increment: pg-step; | |||
position: relative; | |||
padding: 14px 14px 14px 56px; | |||
border-left: 2px solid #e6eaee; | |||
margin-left: 20px; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-step:last-child { | |||
border-left-color: transparent; | |||
} | |||
.pg-page .pg-step::before { | |||
content: counter(pg-step); | |||
position: absolute; | |||
left: -17px; | |||
top: 12px; | |||
width: 32px; | |||
height: 32px; | |||
line-height: 30px; | |||
text-align: center; | |||
font-weight: 900; | |||
font-size: 0.88em; | |||
color: #ffffff; | |||
background: #6c5ce7; | |||
border: 2px solid #ffffff; | |||
} | |||
.pg-page .pg-step:hover::before { | |||
background: #5a4fcf; | |||
} | |||
.pg-page .pg-step:hover { | |||
border-left-color: #6c5ce7; | |||
} | |||
.pg-page .pg-step-title { | |||
font-weight: 900; | |||
font-size: 1.05em; | |||
display: block; | |||
} | |||
.pg-page .pg-step-desc { | |||
color: #4b535d; | |||
font-size: 0.92em; | |||
display: block; | |||
margin-top: 4px; | |||
line-height: 1.55; | |||
} | |||
/* ============================================================ | |||
17. 引言卡片 (Blockquote with ::before) | |||
============================================================ */ | |||
.pg-page .pg-quotes { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-quote { | |||
flex: 1 1 calc(50% - 16px); | |||
min-width: 280px; | |||
margin: 8px; | |||
position: relative; | |||
padding: 38px 18px 18px 18px; | |||
border: 1px solid #e6eaee; | |||
border-left: 4px solid #d5cff5; | |||
background: #fbfcfd; | |||
overflow: hidden; | |||
transition: border-color 200ms ease, box-shadow 200ms ease; | |||
} | |||
.pg-page .pg-quote:hover { | |||
border-color: #d5cff5; | |||
border-left-color: #6c5ce7; | |||
box-shadow: 0 4px 16px rgba(108, 92, 231, 0.06); | |||
} | |||
.pg-page .pg-quote::before { | |||
content: "\201c"; | |||
position: absolute; | |||
top: 6px; | |||
left: 12px; | |||
font-size: 2.8em; | |||
line-height: 1; | |||
color: #d5cff5; | |||
font-family: Georgia, "Times New Roman", serif; | |||
} | |||
.pg-page .pg-quote-text { | |||
color: #3f4650; | |||
font-size: 1em; | |||
line-height: 1.65; | |||
font-style: italic; | |||
display: block; | |||
} | |||
.pg-page .pg-quote-author { | |||
display: block; | |||
margin-top: 10px; | |||
font-weight: 900; | |||
font-size: 0.88em; | |||
color: #6c5ce7; | |||
} | |||
.pg-page .pg-quote-role { | |||
display: block; | |||
font-size: 0.82em; | |||
color: #5b626a; | |||
margin-top: 2px; | |||
} | |||
/* ============================================================ | |||
18. CSS 图案背景 (Pattern Backgrounds) | |||
============================================================ */ | |||
.pg-page .pg-pattern-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -6px; | |||
} | |||
.pg-page .pg-pattern-item { | |||
flex: 1 1 calc(25% - 12px); | |||
min-width: 160px; | |||
margin: 6px; | |||
border: 1px solid #e6eaee; | |||
overflow: hidden; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-pattern-item:hover { | |||
border-color: #a29bfe; | |||
} | |||
.pg-page .pg-pattern-swatch { | |||
height: 80px; | |||
} | |||
/* 条纹 */ | |||
.pg-page .pg-pat-stripe { | |||
background: repeating-linear-gradient(45deg, | |||
#f5f0ff, | |||
#f5f0ff 10px, | |||
#ede8ff 10px, | |||
#ede8ff 20px); | |||
} | |||
/* 水平条纹 */ | |||
.pg-page .pg-pat-hstripe { | |||
background: repeating-linear-gradient(0deg, | |||
#f0f7ff, | |||
#f0f7ff 8px, | |||
#dbeafe 8px, | |||
#dbeafe 16px); | |||
} | |||
/* 网格 */ | |||
.pg-page .pg-pat-grid { | |||
background: | |||
repeating-linear-gradient(0deg, | |||
transparent, | |||
transparent 19px, | |||
#e6eaee 19px, | |||
#e6eaee 20px), | |||
repeating-linear-gradient(90deg, | |||
transparent, | |||
transparent 19px, | |||
#e6eaee 19px, | |||
#e6eaee 20px); | |||
background-color: #fbfcfd; | |||
} | |||
/* 波点 */ | |||
.pg-page .pg-pat-dot { | |||
background: | |||
radial-gradient(circle, #d5cff5 2px, transparent 2px); | |||
background-size: 16px 16px; | |||
background-color: #fbfcfd; | |||
} | |||
/* 对角线 */ | |||
.pg-page .pg-pat-diag { | |||
background: repeating-linear-gradient(-45deg, | |||
#f0faf6, | |||
#f0faf6 8px, | |||
#d5f5e8 8px, | |||
#d5f5e8 16px); | |||
} | |||
/* 棋盘 */ | |||
.pg-page .pg-pat-checker { | |||
background: | |||
linear-gradient(45deg, #f0f2f5 25%, transparent 25%), | |||
linear-gradient(-45deg, #f0f2f5 25%, transparent 25%), | |||
linear-gradient(45deg, transparent 75%, #f0f2f5 75%), | |||
linear-gradient(-45deg, transparent 75%, #f0f2f5 75%); | |||
background-size: 20px 20px; | |||
background-position: 0 0, 0 10px, 10px -10px, -10px 0; | |||
background-color: #ffffff; | |||
} | |||
/* 菱形 */ | |||
.pg-page .pg-pat-diamond { | |||
background: | |||
linear-gradient(135deg, #fef5ee 25%, transparent 25%), | |||
linear-gradient(225deg, #fef5ee 25%, transparent 25%), | |||
linear-gradient(315deg, #fef5ee 25%, transparent 25%), | |||
linear-gradient(45deg, #fef5ee 25%, transparent 25%); | |||
background-size: 20px 20px; | |||
background-color: #ffecd2; | |||
} | |||
/* 锯齿 */ | |||
.pg-page .pg-pat-zigzag { | |||
background: | |||
linear-gradient(135deg, #2d3436 25%, transparent 25%), | |||
linear-gradient(225deg, #2d3436 25%, transparent 25%); | |||
background-size: 20px 12px; | |||
background-position: 0 0, 10px 0; | |||
background-color: #636e72; | |||
} | |||
.pg-page .pg-pattern-label { | |||
padding: 6px 10px; | |||
font-weight: 900; | |||
font-size: 0.85em; | |||
color: #3f4650; | |||
} | |||
/* ============================================================ | |||
19. 文字特效展示 (Text Effects) | |||
============================================================ */ | |||
.pg-page .pg-text-fx { | |||
padding: 14px; | |||
border: 1px solid #e6eaee; | |||
margin-top: 10px; | |||
background: #fbfcfd; | |||
} | |||
.pg-page .pg-text-fx+.pg-text-fx { | |||
margin-top: 8px; | |||
} | |||
.pg-page .pg-fx-label { | |||
display: block; | |||
font-size: 0.78em; | |||
color: #636e72; | |||
font-weight: 900; | |||
text-transform: uppercase; | |||
letter-spacing: 0.06em; | |||
margin-bottom: 6px; | |||
} | |||
/* 发光文字 */ | |||
.pg-page .pg-fx-glow { | |||
font-size: 1.6em; | |||
font-weight: 900; | |||
color: #6c5ce7; | |||
text-shadow: 0 0 8px rgba(108, 92, 231, 0.4), 0 0 20px rgba(108, 92, 231, 0.2); | |||
} | |||
/* 立体文字 */ | |||
.pg-page .pg-fx-3d { | |||
font-size: 1.6em; | |||
font-weight: 900; | |||
color: #2d3436; | |||
text-shadow: | |||
1px 1px 0 #636e72, | |||
2px 2px 0 #b2bec3, | |||
3px 3px 0 #dfe6e9; | |||
} | |||
/* 长阴影文字 */ | |||
.pg-page .pg-fx-long { | |||
font-size: 1.6em; | |||
font-weight: 900; | |||
color: #e17055; | |||
text-shadow: | |||
1px 1px 0 rgba(225, 112, 85, 0.3), | |||
2px 2px 0 rgba(225, 112, 85, 0.25), | |||
3px 3px 0 rgba(225, 112, 85, 0.2), | |||
4px 4px 0 rgba(225, 112, 85, 0.15), | |||
5px 5px 0 rgba(225, 112, 85, 0.1), | |||
6px 6px 0 rgba(225, 112, 85, 0.05); | |||
} | |||
/* 描边文字 (text-shadow 模拟) */ | |||
.pg-page .pg-fx-outline { | |||
font-size: 1.6em; | |||
font-weight: 900; | |||
color: #ffffff; | |||
text-shadow: | |||
-1px -1px 0 #0984e3, | |||
1px -1px 0 #0984e3, | |||
-1px 1px 0 #0984e3, | |||
1px 1px 0 #0984e3; | |||
} | |||
/* 模糊文字 —— hover 时清晰 */ | |||
.pg-page .pg-fx-blur { | |||
font-size: 1.6em; | |||
font-weight: 900; | |||
color: transparent; | |||
text-shadow: 0 0 12px #2d3436; | |||
transition: text-shadow 300ms ease, color 300ms ease; | |||
} | |||
.pg-page .pg-fx-blur:hover { | |||
color: #2d3436; | |||
text-shadow: none; | |||
} | |||
/* 波浪下划线 */ | |||
.pg-page .pg-fx-wavy { | |||
font-size: 1.1em; | |||
font-weight: 900; | |||
text-decoration: underline wavy #e84393; | |||
} | |||
/* 虚线下划线 */ | |||
.pg-page .pg-fx-dotted { | |||
font-size: 1.1em; | |||
font-weight: 900; | |||
text-decoration: underline dotted #00b894; | |||
} | |||
/* 字间距展示 */ | |||
.pg-page .pg-fx-spacing { | |||
font-size: 1.1em; | |||
font-weight: 900; | |||
letter-spacing: 0.5em; | |||
color: #636e72; | |||
text-transform: uppercase; | |||
} | |||
/* ============================================================ | |||
20. Box-shadow 像素图形 | |||
============================================================ */ | |||
.pg-page .pg-pixel-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-pixel-card { | |||
flex: 1 1 calc(33.333% - 16px); | |||
min-width: 180px; | |||
margin: 8px; | |||
padding: 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
text-align: center; | |||
} | |||
.pg-page .pg-pixel-canvas { | |||
display: inline-block; | |||
width: 6px; | |||
height: 6px; | |||
margin: 20px auto; | |||
background: transparent; | |||
} | |||
/* 爱心 — 用 box-shadow 绘制像素 */ | |||
.pg-page .pg-px-heart { | |||
background: transparent; | |||
box-shadow: | |||
6px 0 0 #e84393, 12px 0 0 #e84393, | |||
24px 0 0 #e84393, 30px 0 0 #e84393, | |||
0 6px 0 #e84393, 6px 6px 0 #e84393, 12px 6px 0 #e84393, 18px 6px 0 #e84393, | |||
24px 6px 0 #e84393, 30px 6px 0 #e84393, 36px 6px 0 #e84393, | |||
0 12px 0 #e84393, 6px 12px 0 #e84393, 12px 12px 0 #e84393, 18px 12px 0 #e84393, | |||
24px 12px 0 #e84393, 30px 12px 0 #e84393, 36px 12px 0 #e84393, | |||
6px 18px 0 #e84393, 12px 18px 0 #e84393, 18px 18px 0 #e84393, | |||
24px 18px 0 #e84393, 30px 18px 0 #e84393, | |||
12px 24px 0 #e84393, 18px 24px 0 #e84393, 24px 24px 0 #e84393, | |||
18px 30px 0 #e84393; | |||
} | |||
/* 星星 */ | |||
.pg-page .pg-px-star { | |||
background: transparent; | |||
box-shadow: | |||
18px 0 0 #fdcb6e, | |||
12px 6px 0 #fdcb6e, 18px 6px 0 #fdcb6e, 24px 6px 0 #fdcb6e, | |||
0 12px 0 #fdcb6e, 6px 12px 0 #fdcb6e, 12px 12px 0 #fdcb6e, | |||
18px 12px 0 #fdcb6e, 24px 12px 0 #fdcb6e, 30px 12px 0 #fdcb6e, 36px 12px 0 #fdcb6e, | |||
6px 18px 0 #fdcb6e, 12px 18px 0 #fdcb6e, 18px 18px 0 #fdcb6e, | |||
24px 18px 0 #fdcb6e, 30px 18px 0 #fdcb6e, | |||
12px 24px 0 #fdcb6e, 18px 24px 0 #fdcb6e, 24px 24px 0 #fdcb6e, | |||
6px 30px 0 #fdcb6e, 12px 30px 0 #fdcb6e, | |||
24px 30px 0 #fdcb6e, 30px 30px 0 #fdcb6e; | |||
} | |||
/* 箭头 */ | |||
.pg-page .pg-px-arrow { | |||
background: transparent; | |||
box-shadow: | |||
18px 0 0 #00b894, | |||
12px 6px 0 #00b894, 18px 6px 0 #00b894, | |||
6px 12px 0 #00b894, 18px 12px 0 #00b894, | |||
0 18px 0 #00b894, 18px 18px 0 #00b894, | |||
18px 24px 0 #00b894, | |||
18px 30px 0 #00b894, | |||
18px 36px 0 #00b894; | |||
} | |||
.pg-page .pg-pixel-label { | |||
display: block; | |||
font-weight: 900; | |||
font-size: 0.88em; | |||
margin-top: 10px; | |||
} | |||
.pg-page .pg-pixel-desc { | |||
display: block; | |||
font-size: 0.78em; | |||
color: #5b626a; | |||
margin-top: 2px; | |||
} | |||
/* ============================================================ | |||
21. 双层边框效果 (Outline + Border) | |||
============================================================ */ | |||
.pg-page .pg-outline-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-outline-card { | |||
flex: 1 1 calc(33.333% - 16px); | |||
min-width: 180px; | |||
margin: 8px; | |||
padding: 18px 14px; | |||
border: 2px solid #e6eaee; | |||
text-align: center; | |||
background: #fbfcfd; | |||
transition: border-color 200ms ease, outline-color 200ms ease, outline-offset 200ms ease; | |||
outline: 2px solid transparent; | |||
outline-offset: 0; | |||
} | |||
/* 效果 1: 外扩边框 */ | |||
.pg-page .pg-oc-expand:hover { | |||
border-color: #6c5ce7; | |||
outline: 2px solid #6c5ce7; | |||
outline-offset: 4px; | |||
} | |||
/* 效果 2: 虚线外环 */ | |||
.pg-page .pg-oc-dashed:hover { | |||
border-color: #0984e3; | |||
outline: 2px dashed #0984e3; | |||
outline-offset: 4px; | |||
} | |||
/* 效果 3: 对比色双框 */ | |||
.pg-page .pg-oc-contrast:hover { | |||
border-color: #e17055; | |||
outline: 2px solid #00b894; | |||
outline-offset: 3px; | |||
} | |||
.pg-page .pg-oc-label { | |||
display: block; | |||
font-weight: 900; | |||
font-size: 0.92em; | |||
margin-top: 6px; | |||
} | |||
.pg-page .pg-oc-desc { | |||
display: block; | |||
font-size: 0.82em; | |||
color: #5b626a; | |||
margin-top: 4px; | |||
} | |||
/* ============================================================ | |||
22. @keyframes 动画集合 | |||
============================================================ */ | |||
/* 旋转 */ | |||
@keyframes pg-spin { | |||
from { | |||
transform: rotate(0deg); | |||
} | |||
to { | |||
transform: rotate(360deg); | |||
} | |||
} | |||
/* 呼吸灯 */ | |||
@keyframes pg-breathe { | |||
0%, | |||
100% { | |||
opacity: 0.4; | |||
} | |||
50% { | |||
opacity: 1; | |||
} | |||
} | |||
/* 弹跳 */ | |||
@keyframes pg-bounce { | |||
0%, | |||
100% { | |||
transform: translateY(0); | |||
} | |||
50% { | |||
transform: translateY(-10px); | |||
} | |||
} | |||
/* 横向滑入 */ | |||
@keyframes pg-slide-in { | |||
from { | |||
transform: translateX(-20px); | |||
opacity: 0; | |||
} | |||
to { | |||
transform: translateX(0); | |||
opacity: 1; | |||
} | |||
} | |||
/* 扫光 */ | |||
@keyframes pg-shimmer { | |||
0% { | |||
background-position: -200px 0; | |||
} | |||
100% { | |||
background-position: 200px 0; | |||
} | |||
} | |||
/* 打字机光标 */ | |||
@keyframes pg-blink { | |||
0%, | |||
100% { | |||
border-right-color: transparent; | |||
} | |||
50% { | |||
border-right-color: #2d3436; | |||
} | |||
} | |||
.pg-page .pg-anim-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-anim-card { | |||
flex: 1 1 calc(33.333% - 16px); | |||
min-width: 180px; | |||
margin: 8px; | |||
padding: 20px 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
text-align: center; | |||
} | |||
.pg-page .pg-anim-demo { | |||
display: inline-block; | |||
width: 32px; | |||
height: 32px; | |||
margin-bottom: 10px; | |||
} | |||
/* 旋转方块 */ | |||
.pg-page .pg-ad-spin { | |||
border: 3px solid #6c5ce7; | |||
animation: pg-spin 2s linear infinite; | |||
} | |||
/* 呼吸灯圆点 */ | |||
.pg-page .pg-ad-breathe { | |||
width: 24px; | |||
height: 24px; | |||
background: #00b894; | |||
border-radius: 0; | |||
animation: pg-breathe 2s ease infinite; | |||
} | |||
/* 弹跳块 */ | |||
.pg-page .pg-ad-bounce { | |||
width: 24px; | |||
height: 24px; | |||
background: #e17055; | |||
animation: pg-bounce 1s ease infinite; | |||
} | |||
/* 滑入块 */ | |||
.pg-page .pg-ad-slide { | |||
width: 40px; | |||
height: 8px; | |||
background: #0984e3; | |||
animation: pg-slide-in 1.5s ease infinite; | |||
} | |||
/* 扫光条 */ | |||
.pg-page .pg-ad-shimmer { | |||
width: 80px; | |||
height: 16px; | |||
background: linear-gradient(90deg, #e6eaee 0%, #f5f0ff 50%, #e6eaee 100%); | |||
background-size: 200px 100%; | |||
animation: pg-shimmer 1.5s ease infinite; | |||
} | |||
/* 打字机光标 */ | |||
.pg-page .pg-ad-blink { | |||
display: inline-block; | |||
font-weight: 900; | |||
font-size: 1.1em; | |||
color: #2d3436; | |||
border-right: 3px solid #2d3436; | |||
padding-right: 4px; | |||
animation: pg-blink 1s step-end infinite; | |||
} | |||
.pg-page .pg-anim-label { | |||
display: block; | |||
font-weight: 900; | |||
font-size: 0.88em; | |||
margin-top: 6px; | |||
} | |||
.pg-page .pg-anim-desc { | |||
display: block; | |||
font-size: 0.78em; | |||
color: #5b626a; | |||
margin-top: 4px; | |||
} | |||
/* ============================================================ | |||
23. 瀑布流布局 (Masonry via column-count) | |||
============================================================ */ | |||
.pg-page .pg-masonry { | |||
column-count: 3; | |||
column-gap: 12px; | |||
} | |||
.pg-page .pg-masonry-item { | |||
break-inside: avoid; | |||
margin-bottom: 12px; | |||
padding: 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
transition: border-color 200ms ease, box-shadow 200ms ease; | |||
} | |||
.pg-page .pg-masonry-item:hover { | |||
border-color: #a29bfe; | |||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); | |||
} | |||
.pg-page .pg-mi-tall { | |||
min-height: 140px; | |||
} | |||
.pg-page .pg-mi-short { | |||
min-height: 60px; | |||
} | |||
.pg-page .pg-mi-med { | |||
min-height: 100px; | |||
} | |||
.pg-page .pg-masonry-title { | |||
font-weight: 900; | |||
font-size: 0.95em; | |||
display: block; | |||
} | |||
.pg-page .pg-masonry-text { | |||
display: block; | |||
font-size: 0.88em; | |||
color: #4b535d; | |||
margin-top: 4px; | |||
line-height: 1.55; | |||
} | |||
.pg-page .pg-masonry-color { | |||
height: 40px; | |||
margin-top: 8px; | |||
} | |||
/* ============================================================ | |||
24. Tooltip 悬浮提示 (CSS :hover + ::after) | |||
============================================================ */ | |||
.pg-page .pg-tooltip-row { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-tip { | |||
position: relative; | |||
flex: 1 1 calc(25% - 16px); | |||
min-width: 120px; | |||
margin: 8px; | |||
padding: 14px; | |||
border: 2px solid #e6eaee; | |||
text-align: center; | |||
font-weight: 900; | |||
font-size: 0.95em; | |||
background: #fbfcfd; | |||
cursor: default; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-tip:hover { | |||
border-color: #6c5ce7; | |||
} | |||
.pg-page .pg-tip::after { | |||
content: attr(data-tip); | |||
position: absolute; | |||
bottom: 100%; | |||
left: 50%; | |||
margin-left: -80px; | |||
margin-bottom: 6px; | |||
width: 160px; | |||
padding: 6px 10px; | |||
background: #2d3436; | |||
color: #ffffff; | |||
font-size: 0.78em; | |||
font-weight: 400; | |||
line-height: 1.4; | |||
text-align: center; | |||
opacity: 0; | |||
transition: opacity 200ms ease; | |||
z-index: 10; | |||
} | |||
.pg-page .pg-tip:hover::after { | |||
opacity: 1; | |||
} | |||
/* ============================================================ | |||
25. 对比卡片 (Comparison Cards) | |||
============================================================ */ | |||
.pg-page .pg-compare { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-compare-col { | |||
flex: 1 1 calc(50% - 16px); | |||
min-width: 280px; | |||
margin: 8px; | |||
border: 2px solid #e6eaee; | |||
background: #fbfcfd; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-compare-col:hover { | |||
border-color: #a29bfe; | |||
} | |||
.pg-page .pg-compare-header { | |||
padding: 14px; | |||
border-bottom: 2px solid #e6eaee; | |||
font-weight: 900; | |||
font-size: 1.05em; | |||
text-align: center; | |||
} | |||
.pg-page .pg-ch-yes { | |||
background: #f0faf6; | |||
color: #00b894; | |||
border-bottom-color: #b5e8d5; | |||
} | |||
.pg-page .pg-ch-no { | |||
background: #fef5ee; | |||
color: #e17055; | |||
border-bottom-color: #fad7c0; | |||
} | |||
.pg-page .pg-compare-body { | |||
padding: 14px; | |||
} | |||
.pg-page .pg-compare-item { | |||
padding: 6px 0; | |||
border-bottom: 1px solid #f0f2f5; | |||
font-size: 0.92em; | |||
color: #3f4650; | |||
} | |||
.pg-page .pg-compare-item:last-child { | |||
border-bottom: 0; | |||
} | |||
.pg-page .pg-ci-icon { | |||
display: inline-block; | |||
width: 20px; | |||
margin-right: 6px; | |||
font-weight: 900; | |||
text-align: center; | |||
} | |||
.pg-page .pg-ci-yes { | |||
color: #00b894; | |||
} | |||
.pg-page .pg-ci-no { | |||
color: #e17055; | |||
} | |||
/* ============================================================ | |||
新增区域标题颜色 | |||
============================================================ */ | |||
.pg-page .pg-h-step { | |||
border-left-color: #6c5ce7; | |||
} | |||
.pg-page .pg-h-quote { | |||
border-left-color: #d5cff5; | |||
} | |||
.pg-page .pg-h-pattern { | |||
border-left-color: #a29bfe; | |||
} | |||
.pg-page .pg-h-textfx { | |||
border-left-color: #2d3436; | |||
} | |||
.pg-page .pg-h-pixel { | |||
border-left-color: #e84393; | |||
} | |||
.pg-page .pg-h-outline { | |||
border-left-color: #636e72; | |||
} | |||
.pg-page .pg-h-anim { | |||
border-left-color: #e17055; | |||
} | |||
.pg-page .pg-h-mason { | |||
border-left-color: #0984e3; | |||
} | |||
.pg-page .pg-h-tip { | |||
border-left-color: #fdcb6e; | |||
} | |||
.pg-page .pg-h-compare { | |||
border-left-color: #00cec9; | |||
} | |||
/* ============================================================ | |||
响应式补充 (720px) | |||
============================================================ */ | |||
@media (max-width: 720px) { | |||
.pg-page .pg-quote { | |||
flex-basis: 100%; | |||
} | |||
.pg-page .pg-pattern-item { | |||
flex-basis: calc(50% - 12px); | |||
} | |||
.pg-page .pg-pixel-card, | |||
.pg-page .pg-anim-card, | |||
.pg-page .pg-outline-card { | |||
flex-basis: calc(50% - 16px); | |||
} | |||
.pg-page .pg-masonry { | |||
column-count: 2; | |||
} | |||
.pg-page .pg-tip { | |||
flex-basis: calc(50% - 16px); | |||
} | |||
.pg-page .pg-compare-col { | |||
flex-basis: 100%; | |||
} | |||
.pg-page .pg-shape-card { | |||
flex-basis: calc(50% - 16px); | |||
} | |||
} | |||
/* ============================================================ | |||
26. CSS Border 形状 (Pure Border Shapes) | |||
============================================================ */ | |||
.pg-page .pg-shape-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-shape-card { | |||
flex: 1 1 calc(16.666% - 16px); | |||
min-width: 120px; | |||
margin: 8px; | |||
padding: 18px 10px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
text-align: center; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-shape-card:hover { | |||
border-color: #a29bfe; | |||
} | |||
.pg-page .pg-shape-demo { | |||
display: inline-block; | |||
margin-bottom: 10px; | |||
} | |||
/* 三角形(向上) */ | |||
.pg-page .pg-sh-tri-up { | |||
width: 0; | |||
height: 0; | |||
border-left: 20px solid transparent; | |||
border-right: 20px solid transparent; | |||
border-bottom: 32px solid #6c5ce7; | |||
} | |||
/* 三角形(向右) */ | |||
.pg-page .pg-sh-tri-right { | |||
width: 0; | |||
height: 0; | |||
border-top: 20px solid transparent; | |||
border-bottom: 20px solid transparent; | |||
border-left: 32px solid #0984e3; | |||
} | |||
/* 菱形 */ | |||
.pg-page .pg-sh-diamond { | |||
width: 24px; | |||
height: 24px; | |||
background: #e17055; | |||
transform: rotate(45deg); | |||
} | |||
/* 梯形 */ | |||
.pg-page .pg-sh-trapezoid { | |||
width: 40px; | |||
height: 0; | |||
border-bottom: 28px solid #00b894; | |||
border-left: 10px solid transparent; | |||
border-right: 10px solid transparent; | |||
} | |||
/* 对话气泡 */ | |||
.pg-page .pg-sh-bubble { | |||
position: relative; | |||
width: 48px; | |||
height: 28px; | |||
background: #fdcb6e; | |||
} | |||
.pg-page .pg-sh-bubble::after { | |||
content: ""; | |||
position: absolute; | |||
bottom: -10px; | |||
left: 10px; | |||
width: 0; | |||
height: 0; | |||
border-left: 10px solid transparent; | |||
border-right: 10px solid transparent; | |||
border-top: 10px solid #fdcb6e; | |||
} | |||
/* 平行四边形 */ | |||
.pg-page .pg-sh-para { | |||
width: 48px; | |||
height: 28px; | |||
background: #e84393; | |||
transform: skewX(-15deg); | |||
} | |||
.pg-page .pg-shape-label { | |||
display: block; | |||
font-weight: 900; | |||
font-size: 0.82em; | |||
margin-top: 4px; | |||
} | |||
/* ============================================================ | |||
27. 竖排文字 (writing-mode) | |||
============================================================ */ | |||
.pg-page .pg-vertical-row { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-vertical-card { | |||
flex: 0 0 auto; | |||
margin: 8px; | |||
padding: 18px 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
transition: border-color 200ms ease; | |||
} | |||
.pg-page .pg-vertical-card:hover { | |||
border-color: #00cec9; | |||
} | |||
.pg-page .pg-vt-text { | |||
writing-mode: vertical-rl; | |||
font-weight: 900; | |||
font-size: 1.1em; | |||
line-height: 1.8; | |||
letter-spacing: 0.15em; | |||
} | |||
.pg-page .pg-vt-label { | |||
display: block; | |||
font-size: 0.82em; | |||
color: #5b626a; | |||
margin-top: 8px; | |||
text-align: center; | |||
} | |||
/* ============================================================ | |||
28. 斑马纹 (:nth-child) | |||
============================================================ */ | |||
.pg-page .pg-zebra { | |||
border: 1px solid #e6eaee; | |||
overflow: hidden; | |||
} | |||
.pg-page .pg-zebra-header { | |||
display: flex; | |||
padding: 10px 14px; | |||
background: #2d3436; | |||
color: #ffffff; | |||
font-weight: 900; | |||
font-size: 0.88em; | |||
} | |||
.pg-page .pg-zebra-row { | |||
display: flex; | |||
padding: 8px 14px; | |||
font-size: 0.92em; | |||
border-bottom: 1px solid #f0f2f5; | |||
transition: background 120ms ease; | |||
} | |||
.pg-page .pg-zebra-row:nth-child(even) { | |||
background: #f8f9fb; | |||
} | |||
.pg-page .pg-zebra-row:hover { | |||
background: #f0f5ff; | |||
} | |||
.pg-page .pg-zebra-row:last-child { | |||
border-bottom: 0; | |||
} | |||
.pg-page .pg-zc { | |||
flex: 1; | |||
} | |||
.pg-page .pg-zc-name { | |||
font-weight: 900; | |||
} | |||
/* ============================================================ | |||
29. 文字省略 (Text Ellipsis) | |||
============================================================ */ | |||
.pg-page .pg-ellipsis-demo { | |||
margin-top: 10px; | |||
padding: 12px 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
} | |||
.pg-page .pg-ellipsis-demo+.pg-ellipsis-demo { | |||
margin-top: 8px; | |||
} | |||
.pg-page .pg-ell-single { | |||
display: block; | |||
overflow: hidden; | |||
white-space: nowrap; | |||
text-overflow: ellipsis; | |||
font-weight: 900; | |||
} | |||
.pg-page .pg-ell-label { | |||
display: block; | |||
font-size: 0.78em; | |||
color: #636e72; | |||
margin-bottom: 4px; | |||
} | |||
/* ============================================================ | |||
30. 渐变边框 (border-image) | |||
============================================================ */ | |||
.pg-page .pg-bi-grid { | |||
display: flex; | |||
flex-wrap: wrap; | |||
margin: -8px; | |||
} | |||
.pg-page .pg-bi-card { | |||
flex: 1 1 calc(33.333% - 16px); | |||
min-width: 200px; | |||
margin: 8px; | |||
padding: 18px 14px; | |||
background: #fbfcfd; | |||
transition: box-shadow 200ms ease; | |||
} | |||
.pg-page .pg-bi-card:hover { | |||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); | |||
} | |||
.pg-page .pg-bi-violet { | |||
border: 3px solid; | |||
border-image: linear-gradient(135deg, #a29bfe, #6c5ce7) 1; | |||
} | |||
.pg-page .pg-bi-ocean { | |||
border: 3px solid; | |||
border-image: linear-gradient(135deg, #74b9ff, #00b894) 1; | |||
} | |||
.pg-page .pg-bi-sunset { | |||
border: 3px solid; | |||
border-image: linear-gradient(135deg, #fd79a8, #fdcb6e) 1; | |||
} | |||
.pg-page .pg-bi-label { | |||
font-weight: 900; | |||
font-size: 0.95em; | |||
display: block; | |||
} | |||
.pg-page .pg-bi-desc { | |||
display: block; | |||
font-size: 0.85em; | |||
color: #5b626a; | |||
margin-top: 4px; | |||
} | |||
.pg-page .pg-bi-code { | |||
display: block; | |||
font-size: 0.78em; | |||
color: #636e72; | |||
margin-top: 6px; | |||
font-family: "Courier New", Courier, monospace; | |||
} | |||
/* ============================================================ | |||
新增区域标题颜色 | |||
============================================================ */ | |||
.pg-page .pg-h-shape { | |||
border-left-color: #a29bfe; | |||
} | |||
.pg-page .pg-h-vert { | |||
border-left-color: #00cec9; | |||
} | |||
.pg-page .pg-h-zebra { | |||
border-left-color: #2d3436; | |||
} | |||
.pg-page .pg-h-ell { | |||
border-left-color: #636e72; | |||
} | |||
.pg-page .pg-h-bi { | |||
border-left-color: #fd79a8; | |||
} | |||
.pg-page .pg-h-summary { | |||
border-left-color: #e17055; | |||
} | |||
/* ============================================================ | |||
总结区域 (Summary / 能力边界文档) | |||
============================================================ */ | |||
.pg-page .pg-summary { | |||
margin-top: 12px; | |||
} | |||
.pg-page .pg-sum-group { | |||
margin-top: 16px; | |||
padding: 14px; | |||
border: 1px solid #e6eaee; | |||
background: #fbfcfd; | |||
} | |||
.pg-page .pg-sum-group+.pg-sum-group { | |||
margin-top: 12px; | |||
} | |||
.pg-page .pg-sum-title { | |||
font-weight: 900; | |||
font-size: 1em; | |||
display: block; | |||
padding-bottom: 8px; | |||
margin-bottom: 10px; | |||
border-bottom: 1px solid #e6eaee; | |||
} | |||
.pg-page .pg-sum-list { | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.pg-page .pg-sum-item { | |||
padding: 4px 0; | |||
font-size: 0.92em; | |||
color: #3f4650; | |||
line-height: 1.55; | |||
border-bottom: 1px solid #f5f6f8; | |||
} | |||
.pg-page .pg-sum-item:last-child { | |||
border-bottom: 0; | |||
} | |||
.pg-page .pg-sum-ok { | |||
display: inline-block; | |||
width: 20px; | |||
color: #00b894; | |||
font-weight: 900; | |||
margin-right: 4px; | |||
} | |||
.pg-page .pg-sum-no { | |||
display: inline-block; | |||
width: 20px; | |||
color: #e17055; | |||
font-weight: 900; | |||
margin-right: 4px; | |||
} | |||
.pg-page .pg-sum-warn { | |||
display: inline-block; | |||
width: 20px; | |||
color: #fdcb6e; | |||
font-weight: 900; | |||
margin-right: 4px; | |||
} | |||
.pg-page .pg-sum-note { | |||
margin-top: 12px; | |||
padding: 10px 14px; | |||
border-left: 4px solid #fdcb6e; | |||
background: #fffcf0; | |||
font-size: 0.88em; | |||
color: #3f4650; | |||
line-height: 1.55; | |||
} | |||
/* ============================================================ | |||
响应式补充 (720px) — 新增组件 | |||
============================================================ */ | |||
@media (max-width: 720px) { | |||
.pg-page .pg-shape-card { | |||
flex-basis: calc(33.333% - 16px); | |||
} | |||
.pg-page .pg-bi-card { | |||
flex-basis: calc(50% - 16px); | |||
} | |||
} | |||
@media (max-width: 480px) { | |||
.pg-page .pg-shape-card { | |||
flex-basis: calc(50% - 16px); | |||
} | |||
.pg-page .pg-bi-card { | |||
flex-basis: 100%; | |||
} | } | ||
} | } | ||
2026年2月14日 (六) 17:52的最新版本
/* ============================================================
TemplateStyles — playground_styles.css
目标:展示 MediaWiki CSS-only 交互与视觉的各种可能性
约束:MediaWiki 1.39 TemplateStyles 白名单内属性
============================================================ */
/* ── 全局重置 ── */
.pg-page {
width: 100%;
font-size: 15px;
line-height: 1.65;
color: #1f2328;
}
.pg-page * {
box-sizing: border-box;
}
.pg-page p {
margin: 0;
}
/* 外部链接图标移除 */
.pg-page a.external {
background: none !important;
padding-right: 0 !important;
}
.pg-page a.external::after {
display: none !important;
}
/* ── 通用工具类 ── */
.pg-page .pg-muted {
color: #5b626a;
font-size: 0.93em;
}
.pg-page .pg-mt12 {
margin-top: 12px;
}
.pg-page .pg-mt20 {
margin-top: 20px;
}
/* ── Zone 分区容器 ── */
.pg-page .pg-zone {
margin-top: 36px;
padding-top: 24px;
padding-bottom: 24px;
border-top: 2px solid #e6eaee;
}
.pg-page .pg-zone:first-child,
.pg-page .pg-zone-hero {
margin-top: 0;
padding-top: 0;
border-top: 0;
}
/* ── 区域标题 ── */
.pg-page .pg-section-h {
font-size: 1.3em;
font-weight: 900;
margin: 0 0 16px 0;
border-left: 10px solid #e6eaee;
padding-left: 12px;
line-height: 1.3;
}
/* 各区域标题颜色标识 */
.pg-page .pg-h-hero {
border-left-color: #6c5ce7;
}
.pg-page .pg-h-accord {
border-left-color: #00b894;
}
.pg-page .pg-h-tabs {
border-left-color: #0984e3;
}
.pg-page .pg-h-hover {
border-left-color: #e17055;
}
.pg-page .pg-h-gallery {
border-left-color: #fdcb6e;
}
.pg-page .pg-h-bar {
border-left-color: #a29bfe;
}
.pg-page .pg-h-typo {
border-left-color: #636e72;
}
.pg-page .pg-h-grad {
border-left-color: #fd79a8;
}
.pg-page .pg-h-tl {
border-left-color: #00cec9;
}
.pg-page .pg-h-footer {
border-left-color: #636e72;
}
/* ============================================================
1. HERO 区域
============================================================ */
.pg-page .pg-hero {
position: relative;
overflow: hidden;
background: linear-gradient(135deg, #f5f0ff 0%, #e8f4fd 50%, #fdf2e9 100%);
border-top: 1px solid #e6eaee;
border-bottom: 1px solid #e6eaee;
padding: 28px 20px 24px 20px;
}
.pg-page .pg-hero-kicker {
color: #6c5ce7;
font-size: 0.88em;
font-weight: 900;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.pg-page .pg-hero-title {
font-size: 2.6em;
font-weight: 900;
line-height: 1.1;
margin-top: 6px;
color: #5a4fcf;
}
.pg-page .pg-hero-sub {
margin-top: 10px;
color: #3f4650;
font-size: 1.08em;
line-height: 1.55;
max-width: 680px;
}
.pg-page .pg-hero-meta {
margin-top: 10px;
color: #5b626a;
font-size: 0.9em;
}
.pg-page .pg-hero-nav {
margin-top: 12px;
color: #4b535d;
font-size: 0.95em;
line-height: 1.7;
}
.pg-page .pg-hero-nav a {
text-decoration: none;
border-bottom: 1px dotted #b7c0cb;
}
.pg-page .pg-hero-nav a:hover {
border-bottom-style: solid;
color: #6c5ce7;
}
/* ============================================================
2. 手风琴 / FAQ (CSS :target)
============================================================ */
.pg-page .pg-accord {
border-left: 3px solid #00b894;
padding-left: 14px;
}
.pg-page .pg-q {
margin-top: 10px;
padding: 10px 12px;
border: 1px solid #e6eaee;
background: #fbfcfd;
transition: background 150ms ease, border-color 150ms ease;
}
.pg-page .pg-q+.pg-q {
margin-top: 8px;
}
.pg-page .pg-q-title {
font-weight: 900;
cursor: default;
}
.pg-page .pg-q-title a {
text-decoration: none;
color: #1f2328;
display: block;
}
.pg-page .pg-q-title a:hover {
color: #00b894;
}
/* 展开箭头指示器 */
.pg-page .pg-q-arrow {
display: inline-block;
margin-right: 8px;
font-size: 0.85em;
color: #00b894;
transition: color 120ms ease;
}
.pg-page .pg-q-body {
max-height: 0;
overflow: hidden;
opacity: 0;
transition: max-height 300ms ease, opacity 200ms ease, margin 200ms ease;
margin-top: 0;
color: #4b535d;
line-height: 1.6;
}
/* :target 展开 */
.pg-page .pg-q:target {
background: #f0faf6;
border-color: #00b894;
}
.pg-page .pg-q:target .pg-q-body {
max-height: 400px;
opacity: 1;
margin-top: 10px;
}
.pg-page .pg-q:target .pg-q-arrow {
color: #1f2328;
}
/* 收起链接 */
.pg-page .pg-q-close {
display: block;
margin-top: 8px;
font-size: 0.88em;
color: #00b894;
}
/* ============================================================
3. Tabs 切换面板 (CSS :target)
============================================================ */
.pg-page .pg-tabs {
background: transparent;
padding: 0;
}
.pg-page .pg-tab-anchor {
display: block;
height: 0;
overflow: hidden;
}
.pg-page .pg-tabbar {
margin-bottom: 12px;
border-bottom: 2px solid #e6eaee;
padding-bottom: 0;
}
.pg-page .pg-tabbar p {
display: inline;
margin: 0;
}
.pg-page .pg-tabbar br {
display: none;
}
.pg-page .pg-tabbar a {
display: inline-block;
padding: 8px 14px;
margin: 0 4px -2px 0;
border: 1px solid transparent;
border-bottom: 2px solid transparent;
background: transparent;
text-decoration: none;
font-weight: 900;
font-size: 0.95em;
color: #5b626a;
transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}
.pg-page .pg-tabbar a:hover {
background: #f0f5ff;
color: #0984e3;
}
.pg-page .pg-tabpanel {
display: none;
padding: 14px 0 14px 14px;
border-left: 4px solid #e6eaee;
}
/* 默认显示第一个面板 */
.pg-page .pg-tabpanel-a {
display: block;
border-left-color: #0984e3;
}
.pg-page .pg-tabpanel-b {
border-left-color: #6c5ce7;
}
.pg-page .pg-tabpanel-c {
border-left-color: #00b894;
}
.pg-page .pg-panel-h {
font-weight: 900;
font-size: 1.1em;
margin: 0 0 6px 0;
}
.pg-page .pg-panel-p {
color: #4b535d;
line-height: 1.6;
}
.pg-page .pg-panel-links {
margin-top: 8px;
color: #4b535d;
line-height: 1.7;
}
/* 默认高亮第一个 tab — 使用 $= 结尾匹配(MediaWiki 生成完整路径 href) */
.pg-page .pg-tabbar a[href$="#pg-tab-a"] {
background: #f0f5ff;
border-bottom-color: #0984e3;
color: #0984e3;
}
/* Target 逻辑:显示面板 + 高亮 tab */
.pg-page #pg-tab-b:target~.pg-tabpanels .pg-tabpanel-a,
.pg-page #pg-tab-c:target~.pg-tabpanels .pg-tabpanel-a {
display: none;
}
.pg-page #pg-tab-b:target~.pg-tabpanels .pg-tabpanel-b {
display: block;
}
.pg-page #pg-tab-c:target~.pg-tabpanels .pg-tabpanel-c {
display: block;
}
/* 重置默认 tab 高亮 */
.pg-page #pg-tab-b:target~.pg-tabbar a[href$="#pg-tab-a"],
.pg-page #pg-tab-c:target~.pg-tabbar a[href$="#pg-tab-a"] {
background: transparent;
border-bottom-color: transparent;
color: #5b626a;
}
/* 激活对应 tab 高亮 */
.pg-page #pg-tab-b:target~.pg-tabbar a[href$="#pg-tab-b"] {
background: #f5f0ff;
border-bottom-color: #6c5ce7;
color: #6c5ce7;
}
.pg-page #pg-tab-c:target~.pg-tabbar a[href$="#pg-tab-c"] {
background: #f0faf6;
border-bottom-color: #00b894;
color: #00b894;
}
/* ============================================================
4. Hover 微交互展示
============================================================ */
.pg-page .pg-hover-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-hover-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 200px;
margin: 8px;
padding: 18px 14px;
border: 2px solid #e6eaee;
background: #fbfcfd;
text-align: center;
transition: border-color 200ms ease, background 200ms ease, box-shadow 200ms ease;
}
/* 效果 1: 边框变色 */
.pg-page .pg-hover-card.pg-hc-border:hover {
border-color: #e17055;
}
/* 效果 2: 背景渐变 */
.pg-page .pg-hover-card.pg-hc-bg:hover {
background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
border-color: #fcb69f;
}
/* 效果 3: 阴影浮起 */
.pg-page .pg-hover-card.pg-hc-shadow:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
border-color: #ddd;
}
/* 效果 4: 左边框色条 */
.pg-page .pg-hover-card.pg-hc-left:hover {
border-left: 4px solid #6c5ce7;
padding-left: 12px;
}
/* 效果 5: 底部色条 */
.pg-page .pg-hover-card.pg-hc-bottom:hover {
border-bottom: 4px solid #0984e3;
padding-bottom: 16px;
}
/* 效果 6: 全色反转 */
.pg-page .pg-hover-card.pg-hc-invert:hover {
background: #2d3436;
color: #ffffff;
border-color: #2d3436;
}
.pg-page .pg-hover-icon {
display: inline-block;
width: 48px;
height: 48px;
line-height: 46px;
border: 2px solid #e6eaee;
font-size: 1.3em;
font-weight: 900;
margin-bottom: 10px;
transition: border-color 200ms ease, color 200ms ease;
}
.pg-page .pg-hover-card:hover .pg-hover-icon {
border-color: currentColor;
}
.pg-page .pg-hover-label {
display: block;
font-weight: 900;
font-size: 0.92em;
margin-top: 4px;
}
.pg-page .pg-hover-desc {
display: block;
color: #5b626a;
font-size: 0.85em;
margin-top: 4px;
}
.pg-page .pg-hover-card.pg-hc-invert:hover .pg-hover-desc {
color: #b2bec3;
}
/* ============================================================
5. 网格画廊
============================================================ */
.pg-page .pg-gallery {
display: flex;
flex-wrap: wrap;
margin: -6px;
}
.pg-page .pg-gallery-item {
flex: 1 1 calc(25% - 12px);
min-width: 160px;
margin: 6px;
border: 1px solid #e6eaee;
overflow: hidden;
transition: border-color 200ms ease;
}
.pg-page .pg-gallery-item:hover {
border-color: #fdcb6e;
}
.pg-page .pg-gallery-color {
height: 80px;
transition: opacity 200ms ease;
}
.pg-page .pg-gallery-item:hover .pg-gallery-color {
opacity: 0.85;
}
.pg-page .pg-gc-1 {
background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}
.pg-page .pg-gc-2 {
background: linear-gradient(135deg, #74b9ff, #0984e3);
}
.pg-page .pg-gc-3 {
background: linear-gradient(135deg, #55efc4, #00b894);
}
.pg-page .pg-gc-4 {
background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
}
.pg-page .pg-gc-5 {
background: linear-gradient(135deg, #fab1a0, #e17055);
}
.pg-page .pg-gc-6 {
background: linear-gradient(135deg, #fd79a8, #e84393);
}
.pg-page .pg-gc-7 {
background: linear-gradient(135deg, #636e72, #2d3436);
}
.pg-page .pg-gc-8 {
background: linear-gradient(135deg, #dfe6e9, #b2bec3);
}
.pg-page .pg-gallery-info {
padding: 8px 10px;
}
.pg-page .pg-gallery-name {
font-weight: 900;
font-size: 0.92em;
display: block;
}
.pg-page .pg-gallery-val {
display: block;
font-size: 0.82em;
color: #5b626a;
margin-top: 2px;
font-family: "Courier New", Courier, monospace;
}
/* ============================================================
6. 进度条 / 状态指示器(CSS 动画)
============================================================ */
.pg-page .pg-bars {
padding-left: 14px;
border-left: 3px solid #a29bfe;
}
.pg-page .pg-bar-item {
margin-top: 14px;
}
.pg-page .pg-bar-item:first-child {
margin-top: 0;
}
.pg-page .pg-bar-label {
font-weight: 900;
font-size: 0.92em;
display: flex;
justify-content: space-between;
margin-bottom: 6px;
}
.pg-page .pg-bar-pct {
color: #5b626a;
font-weight: 400;
}
.pg-page .pg-bar-track {
height: 10px;
background: #f0f2f5;
overflow: hidden;
border: 1px solid #e6eaee;
}
.pg-page .pg-bar-fill {
height: 100%;
transition: width 600ms ease;
}
/* 各进度条颜色 */
.pg-page .pg-bf-purple {
background: linear-gradient(90deg, #a29bfe, #6c5ce7);
width: 85%;
}
.pg-page .pg-bf-blue {
background: linear-gradient(90deg, #74b9ff, #0984e3);
width: 72%;
}
.pg-page .pg-bf-green {
background: linear-gradient(90deg, #55efc4, #00b894);
width: 95%;
}
.pg-page .pg-bf-orange {
background: linear-gradient(90deg, #ffeaa7, #e17055);
width: 58%;
}
.pg-page .pg-bf-pink {
background: linear-gradient(90deg, #fd79a8, #e84393);
width: 40%;
}
/* 脉冲动画(仅在 hover 时触发,节制使用) */
@keyframes pg-pulse {
0% {
opacity: 1;
}
50% {
opacity: 0.6;
}
100% {
opacity: 1;
}
}
.pg-page .pg-bar-item:hover .pg-bar-fill {
animation: pg-pulse 1.2s ease infinite;
}
/* ============================================================
7. 排版与色彩系统
============================================================ */
.pg-page .pg-typo-section {
margin-top: 16px;
padding: 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
}
.pg-page .pg-typo-section+.pg-typo-section {
margin-top: 12px;
}
.pg-page .pg-typo-title {
font-weight: 900;
font-size: 0.9em;
color: #636e72;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 10px;
padding-bottom: 6px;
border-bottom: 1px solid #e6eaee;
}
/* 字号展示 */
.pg-page .pg-t-xxl {
font-size: 2.4em;
font-weight: 900;
line-height: 1.1;
}
.pg-page .pg-t-xl {
font-size: 1.8em;
font-weight: 900;
line-height: 1.2;
}
.pg-page .pg-t-lg {
font-size: 1.3em;
font-weight: 900;
line-height: 1.3;
}
.pg-page .pg-t-base {
font-size: 1em;
font-weight: 400;
line-height: 1.65;
}
.pg-page .pg-t-sm {
font-size: 0.88em;
font-weight: 400;
line-height: 1.5;
color: #5b626a;
}
.pg-page .pg-t-xs {
font-size: 0.78em;
font-weight: 400;
line-height: 1.4;
color: #636e72;
}
/* 色彩色块 */
.pg-page .pg-color-row {
display: flex;
flex-wrap: wrap;
margin: -4px;
}
.pg-page .pg-color-chip {
flex: 1 1 calc(16.666% - 8px);
min-width: 80px;
margin: 4px;
padding: 0;
border: 1px solid #e6eaee;
overflow: hidden;
transition: box-shadow 200ms ease;
}
.pg-page .pg-color-chip:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.pg-page .pg-chip-swatch {
height: 48px;
}
.pg-page .pg-chip-label {
padding: 5px 8px;
font-size: 0.78em;
font-weight: 900;
color: #3f4650;
background: #ffffff;
}
/* 色块颜色 */
.pg-page .pg-sw-1 {
background: #6c5ce7;
}
.pg-page .pg-sw-2 {
background: #0984e3;
}
.pg-page .pg-sw-3 {
background: #00b894;
}
.pg-page .pg-sw-4 {
background: #fdcb6e;
}
.pg-page .pg-sw-5 {
background: #e17055;
}
.pg-page .pg-sw-6 {
background: #e84393;
}
.pg-page .pg-sw-7 {
background: #2d3436;
}
.pg-page .pg-sw-8 {
background: #636e72;
}
.pg-page .pg-sw-9 {
background: #b2bec3;
}
.pg-page .pg-sw-10 {
background: #dfe6e9;
}
.pg-page .pg-sw-11 {
background: #f5f6fa;
}
.pg-page .pg-sw-12 {
background: #ffffff;
}
/* ============================================================
8. 渐变色卡片
============================================================ */
.pg-page .pg-grad-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-grad-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 200px;
margin: 8px;
padding: 20px 16px;
border: 1px solid rgba(0, 0, 0, 0.05);
color: #ffffff;
transition: box-shadow 200ms ease, opacity 200ms ease;
}
.pg-page .pg-grad-card:hover {
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.pg-page .pg-grad-name {
font-weight: 900;
font-size: 1.05em;
display: block;
}
.pg-page .pg-grad-desc {
display: block;
margin-top: 4px;
font-size: 0.88em;
opacity: 0.85;
}
.pg-page .pg-grad-code {
display: block;
margin-top: 8px;
font-size: 0.78em;
opacity: 0.7;
font-family: "Courier New", Courier, monospace;
}
/* 渐变色方案 */
.pg-page .pg-g-sunset {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.pg-page .pg-g-ocean {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.pg-page .pg-g-forest {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
color: #1f2328;
}
.pg-page .pg-g-night {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}
.pg-page .pg-g-candy {
background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
color: #1f2328;
}
.pg-page .pg-g-slate {
background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
}
/* ============================================================
9. 竖线时间线
============================================================ */
.pg-page .pg-timeline {
position: relative;
padding-left: 28px;
border-left: 2px solid #00cec9;
}
.pg-page .pg-tl-item {
position: relative;
padding: 10px 0 10px 14px;
border-bottom: 1px solid #f0f2f5;
}
.pg-page .pg-tl-item:last-child {
border-bottom: 0;
}
/* 时间线节点圆点 */
.pg-page .pg-tl-dot {
display: inline-block;
width: 12px;
height: 12px;
border: 2px solid #00cec9;
background: #ffffff;
position: absolute;
left: -35px;
top: 14px;
}
.pg-page .pg-tl-item:hover .pg-tl-dot {
background: #00cec9;
}
.pg-page .pg-tl-date {
font-weight: 900;
font-size: 0.92em;
color: #00cec9;
display: block;
}
.pg-page .pg-tl-text {
font-weight: 900;
font-size: 1em;
color: #1f2328;
display: block;
margin-top: 2px;
}
.pg-page .pg-tl-desc {
color: #4b535d;
font-size: 0.92em;
display: block;
margin-top: 4px;
line-height: 1.5;
}
/* ============================================================
10. Banner 提示条
============================================================ */
.pg-page .pg-banner {
padding: 12px 14px;
border-left: 10px solid #6c5ce7;
background: #f5f0ff;
}
.pg-page .pg-banner-tag {
display: inline-block;
padding: 3px 10px;
margin-right: 10px;
border: 1px solid #d5cff5;
background: #ffffff;
font-weight: 900;
font-size: 0.88em;
color: #6c5ce7;
}
.pg-page .pg-banner-text {
color: #3c444e;
line-height: 1.6;
}
/* ============================================================
11. 双栏布局
============================================================ */
.pg-page .pg-row {
display: flex;
flex-wrap: wrap;
margin: -10px;
}
.pg-page .pg-col {
margin: 10px;
flex: 1 1 420px;
min-width: 300px;
}
/* ============================================================
12. 标签 / Badge
============================================================ */
.pg-page .pg-badge {
display: inline-block;
padding: 2px 9px;
font-size: 0.82em;
font-weight: 900;
border: 1px solid #e6eaee;
background: #fbfcfd;
color: #3f4650;
margin-right: 6px;
margin-bottom: 4px;
}
.pg-page .pg-badge-purple {
border-color: #d5cff5;
background: #f5f0ff;
color: #6c5ce7;
}
.pg-page .pg-badge-blue {
border-color: #bcd6ee;
background: #f0f5ff;
color: #0984e3;
}
.pg-page .pg-badge-green {
border-color: #b5e8d5;
background: #f0faf6;
color: #00b894;
}
.pg-page .pg-badge-orange {
border-color: #fad7c0;
background: #fef5ee;
color: #e17055;
}
.pg-page .pg-badge-pink {
border-color: #f5b7cc;
background: #fef0f5;
color: #e84393;
}
.pg-page .pg-badge-dark {
border-color: #636e72;
background: #2d3436;
color: #ffffff;
}
/* ============================================================
13. 引用块 / Callout
============================================================ */
.pg-page .pg-callout {
padding: 14px 16px;
border-left: 4px solid #e6eaee;
background: #fbfcfd;
margin-top: 12px;
}
.pg-page .pg-callout-info {
border-left-color: #0984e3;
background: #f0f7ff;
}
.pg-page .pg-callout-success {
border-left-color: #00b894;
background: #f0faf6;
}
.pg-page .pg-callout-warning {
border-left-color: #fdcb6e;
background: #fffcf0;
}
.pg-page .pg-callout-danger {
border-left-color: #e17055;
background: #fef5ee;
}
.pg-page .pg-callout-title {
font-weight: 900;
margin-bottom: 4px;
}
.pg-page .pg-callout-body {
color: #4b535d;
line-height: 1.6;
}
/* ============================================================
14. 统计数字展示
============================================================ */
.pg-page .pg-stats {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-stat {
flex: 1 1 calc(25% - 16px);
min-width: 120px;
margin: 8px;
padding: 18px 14px;
border: 1px solid #e6eaee;
text-align: center;
background: #fbfcfd;
transition: border-color 200ms ease, background 200ms ease;
}
.pg-page .pg-stat:hover {
border-color: #6c5ce7;
background: #f5f0ff;
}
.pg-page .pg-stat-num {
display: block;
font-size: 2em;
font-weight: 900;
line-height: 1.1;
color: #6c5ce7;
}
.pg-page .pg-stat-label {
display: block;
margin-top: 6px;
font-size: 0.88em;
font-weight: 900;
color: #5b626a;
}
/* ============================================================
15. Footer
============================================================ */
.pg-page .pg-footer-links {
margin-top: 10px;
color: #4b535d;
line-height: 1.7;
}
/* ============================================================
响应式
============================================================ */
@media (max-width: 720px) {
.pg-page .pg-col {
min-width: 0;
}
.pg-page .pg-hover-card {
flex-basis: calc(50% - 16px);
min-width: 0;
}
.pg-page .pg-gallery-item {
flex-basis: calc(50% - 12px);
min-width: 0;
}
.pg-page .pg-grad-card {
flex-basis: calc(50% - 16px);
min-width: 0;
}
.pg-page .pg-color-chip {
flex-basis: calc(33.333% - 8px);
min-width: 0;
}
.pg-page .pg-stat {
flex-basis: calc(50% - 16px);
min-width: 0;
}
}
@media (max-width: 480px) {
.pg-page .pg-hover-card,
.pg-page .pg-gallery-item,
.pg-page .pg-grad-card {
flex-basis: 100%;
}
.pg-page .pg-hero-title {
font-size: 1.8em;
}
.pg-page .pg-pattern-item {
flex-basis: 100%;
}
.pg-page .pg-compare-col {
flex-basis: 100%;
}
.pg-page .pg-masonry {
column-count: 1;
}
}
/* ============================================================
16. CSS 计数器步骤条 (Stepper)
============================================================ */
.pg-page .pg-stepper {
counter-reset: pg-step;
padding: 0;
}
.pg-page .pg-step {
counter-increment: pg-step;
position: relative;
padding: 14px 14px 14px 56px;
border-left: 2px solid #e6eaee;
margin-left: 20px;
transition: border-color 200ms ease;
}
.pg-page .pg-step:last-child {
border-left-color: transparent;
}
.pg-page .pg-step::before {
content: counter(pg-step);
position: absolute;
left: -17px;
top: 12px;
width: 32px;
height: 32px;
line-height: 30px;
text-align: center;
font-weight: 900;
font-size: 0.88em;
color: #ffffff;
background: #6c5ce7;
border: 2px solid #ffffff;
}
.pg-page .pg-step:hover::before {
background: #5a4fcf;
}
.pg-page .pg-step:hover {
border-left-color: #6c5ce7;
}
.pg-page .pg-step-title {
font-weight: 900;
font-size: 1.05em;
display: block;
}
.pg-page .pg-step-desc {
color: #4b535d;
font-size: 0.92em;
display: block;
margin-top: 4px;
line-height: 1.55;
}
/* ============================================================
17. 引言卡片 (Blockquote with ::before)
============================================================ */
.pg-page .pg-quotes {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-quote {
flex: 1 1 calc(50% - 16px);
min-width: 280px;
margin: 8px;
position: relative;
padding: 38px 18px 18px 18px;
border: 1px solid #e6eaee;
border-left: 4px solid #d5cff5;
background: #fbfcfd;
overflow: hidden;
transition: border-color 200ms ease, box-shadow 200ms ease;
}
.pg-page .pg-quote:hover {
border-color: #d5cff5;
border-left-color: #6c5ce7;
box-shadow: 0 4px 16px rgba(108, 92, 231, 0.06);
}
.pg-page .pg-quote::before {
content: "\201c";
position: absolute;
top: 6px;
left: 12px;
font-size: 2.8em;
line-height: 1;
color: #d5cff5;
font-family: Georgia, "Times New Roman", serif;
}
.pg-page .pg-quote-text {
color: #3f4650;
font-size: 1em;
line-height: 1.65;
font-style: italic;
display: block;
}
.pg-page .pg-quote-author {
display: block;
margin-top: 10px;
font-weight: 900;
font-size: 0.88em;
color: #6c5ce7;
}
.pg-page .pg-quote-role {
display: block;
font-size: 0.82em;
color: #5b626a;
margin-top: 2px;
}
/* ============================================================
18. CSS 图案背景 (Pattern Backgrounds)
============================================================ */
.pg-page .pg-pattern-grid {
display: flex;
flex-wrap: wrap;
margin: -6px;
}
.pg-page .pg-pattern-item {
flex: 1 1 calc(25% - 12px);
min-width: 160px;
margin: 6px;
border: 1px solid #e6eaee;
overflow: hidden;
transition: border-color 200ms ease;
}
.pg-page .pg-pattern-item:hover {
border-color: #a29bfe;
}
.pg-page .pg-pattern-swatch {
height: 80px;
}
/* 条纹 */
.pg-page .pg-pat-stripe {
background: repeating-linear-gradient(45deg,
#f5f0ff,
#f5f0ff 10px,
#ede8ff 10px,
#ede8ff 20px);
}
/* 水平条纹 */
.pg-page .pg-pat-hstripe {
background: repeating-linear-gradient(0deg,
#f0f7ff,
#f0f7ff 8px,
#dbeafe 8px,
#dbeafe 16px);
}
/* 网格 */
.pg-page .pg-pat-grid {
background:
repeating-linear-gradient(0deg,
transparent,
transparent 19px,
#e6eaee 19px,
#e6eaee 20px),
repeating-linear-gradient(90deg,
transparent,
transparent 19px,
#e6eaee 19px,
#e6eaee 20px);
background-color: #fbfcfd;
}
/* 波点 */
.pg-page .pg-pat-dot {
background:
radial-gradient(circle, #d5cff5 2px, transparent 2px);
background-size: 16px 16px;
background-color: #fbfcfd;
}
/* 对角线 */
.pg-page .pg-pat-diag {
background: repeating-linear-gradient(-45deg,
#f0faf6,
#f0faf6 8px,
#d5f5e8 8px,
#d5f5e8 16px);
}
/* 棋盘 */
.pg-page .pg-pat-checker {
background:
linear-gradient(45deg, #f0f2f5 25%, transparent 25%),
linear-gradient(-45deg, #f0f2f5 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #f0f2f5 75%),
linear-gradient(-45deg, transparent 75%, #f0f2f5 75%);
background-size: 20px 20px;
background-position: 0 0, 0 10px, 10px -10px, -10px 0;
background-color: #ffffff;
}
/* 菱形 */
.pg-page .pg-pat-diamond {
background:
linear-gradient(135deg, #fef5ee 25%, transparent 25%),
linear-gradient(225deg, #fef5ee 25%, transparent 25%),
linear-gradient(315deg, #fef5ee 25%, transparent 25%),
linear-gradient(45deg, #fef5ee 25%, transparent 25%);
background-size: 20px 20px;
background-color: #ffecd2;
}
/* 锯齿 */
.pg-page .pg-pat-zigzag {
background:
linear-gradient(135deg, #2d3436 25%, transparent 25%),
linear-gradient(225deg, #2d3436 25%, transparent 25%);
background-size: 20px 12px;
background-position: 0 0, 10px 0;
background-color: #636e72;
}
.pg-page .pg-pattern-label {
padding: 6px 10px;
font-weight: 900;
font-size: 0.85em;
color: #3f4650;
}
/* ============================================================
19. 文字特效展示 (Text Effects)
============================================================ */
.pg-page .pg-text-fx {
padding: 14px;
border: 1px solid #e6eaee;
margin-top: 10px;
background: #fbfcfd;
}
.pg-page .pg-text-fx+.pg-text-fx {
margin-top: 8px;
}
.pg-page .pg-fx-label {
display: block;
font-size: 0.78em;
color: #636e72;
font-weight: 900;
text-transform: uppercase;
letter-spacing: 0.06em;
margin-bottom: 6px;
}
/* 发光文字 */
.pg-page .pg-fx-glow {
font-size: 1.6em;
font-weight: 900;
color: #6c5ce7;
text-shadow: 0 0 8px rgba(108, 92, 231, 0.4), 0 0 20px rgba(108, 92, 231, 0.2);
}
/* 立体文字 */
.pg-page .pg-fx-3d {
font-size: 1.6em;
font-weight: 900;
color: #2d3436;
text-shadow:
1px 1px 0 #636e72,
2px 2px 0 #b2bec3,
3px 3px 0 #dfe6e9;
}
/* 长阴影文字 */
.pg-page .pg-fx-long {
font-size: 1.6em;
font-weight: 900;
color: #e17055;
text-shadow:
1px 1px 0 rgba(225, 112, 85, 0.3),
2px 2px 0 rgba(225, 112, 85, 0.25),
3px 3px 0 rgba(225, 112, 85, 0.2),
4px 4px 0 rgba(225, 112, 85, 0.15),
5px 5px 0 rgba(225, 112, 85, 0.1),
6px 6px 0 rgba(225, 112, 85, 0.05);
}
/* 描边文字 (text-shadow 模拟) */
.pg-page .pg-fx-outline {
font-size: 1.6em;
font-weight: 900;
color: #ffffff;
text-shadow:
-1px -1px 0 #0984e3,
1px -1px 0 #0984e3,
-1px 1px 0 #0984e3,
1px 1px 0 #0984e3;
}
/* 模糊文字 —— hover 时清晰 */
.pg-page .pg-fx-blur {
font-size: 1.6em;
font-weight: 900;
color: transparent;
text-shadow: 0 0 12px #2d3436;
transition: text-shadow 300ms ease, color 300ms ease;
}
.pg-page .pg-fx-blur:hover {
color: #2d3436;
text-shadow: none;
}
/* 波浪下划线 */
.pg-page .pg-fx-wavy {
font-size: 1.1em;
font-weight: 900;
text-decoration: underline wavy #e84393;
}
/* 虚线下划线 */
.pg-page .pg-fx-dotted {
font-size: 1.1em;
font-weight: 900;
text-decoration: underline dotted #00b894;
}
/* 字间距展示 */
.pg-page .pg-fx-spacing {
font-size: 1.1em;
font-weight: 900;
letter-spacing: 0.5em;
color: #636e72;
text-transform: uppercase;
}
/* ============================================================
20. Box-shadow 像素图形
============================================================ */
.pg-page .pg-pixel-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-pixel-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 180px;
margin: 8px;
padding: 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
text-align: center;
}
.pg-page .pg-pixel-canvas {
display: inline-block;
width: 6px;
height: 6px;
margin: 20px auto;
background: transparent;
}
/* 爱心 — 用 box-shadow 绘制像素 */
.pg-page .pg-px-heart {
background: transparent;
box-shadow:
6px 0 0 #e84393, 12px 0 0 #e84393,
24px 0 0 #e84393, 30px 0 0 #e84393,
0 6px 0 #e84393, 6px 6px 0 #e84393, 12px 6px 0 #e84393, 18px 6px 0 #e84393,
24px 6px 0 #e84393, 30px 6px 0 #e84393, 36px 6px 0 #e84393,
0 12px 0 #e84393, 6px 12px 0 #e84393, 12px 12px 0 #e84393, 18px 12px 0 #e84393,
24px 12px 0 #e84393, 30px 12px 0 #e84393, 36px 12px 0 #e84393,
6px 18px 0 #e84393, 12px 18px 0 #e84393, 18px 18px 0 #e84393,
24px 18px 0 #e84393, 30px 18px 0 #e84393,
12px 24px 0 #e84393, 18px 24px 0 #e84393, 24px 24px 0 #e84393,
18px 30px 0 #e84393;
}
/* 星星 */
.pg-page .pg-px-star {
background: transparent;
box-shadow:
18px 0 0 #fdcb6e,
12px 6px 0 #fdcb6e, 18px 6px 0 #fdcb6e, 24px 6px 0 #fdcb6e,
0 12px 0 #fdcb6e, 6px 12px 0 #fdcb6e, 12px 12px 0 #fdcb6e,
18px 12px 0 #fdcb6e, 24px 12px 0 #fdcb6e, 30px 12px 0 #fdcb6e, 36px 12px 0 #fdcb6e,
6px 18px 0 #fdcb6e, 12px 18px 0 #fdcb6e, 18px 18px 0 #fdcb6e,
24px 18px 0 #fdcb6e, 30px 18px 0 #fdcb6e,
12px 24px 0 #fdcb6e, 18px 24px 0 #fdcb6e, 24px 24px 0 #fdcb6e,
6px 30px 0 #fdcb6e, 12px 30px 0 #fdcb6e,
24px 30px 0 #fdcb6e, 30px 30px 0 #fdcb6e;
}
/* 箭头 */
.pg-page .pg-px-arrow {
background: transparent;
box-shadow:
18px 0 0 #00b894,
12px 6px 0 #00b894, 18px 6px 0 #00b894,
6px 12px 0 #00b894, 18px 12px 0 #00b894,
0 18px 0 #00b894, 18px 18px 0 #00b894,
18px 24px 0 #00b894,
18px 30px 0 #00b894,
18px 36px 0 #00b894;
}
.pg-page .pg-pixel-label {
display: block;
font-weight: 900;
font-size: 0.88em;
margin-top: 10px;
}
.pg-page .pg-pixel-desc {
display: block;
font-size: 0.78em;
color: #5b626a;
margin-top: 2px;
}
/* ============================================================
21. 双层边框效果 (Outline + Border)
============================================================ */
.pg-page .pg-outline-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-outline-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 180px;
margin: 8px;
padding: 18px 14px;
border: 2px solid #e6eaee;
text-align: center;
background: #fbfcfd;
transition: border-color 200ms ease, outline-color 200ms ease, outline-offset 200ms ease;
outline: 2px solid transparent;
outline-offset: 0;
}
/* 效果 1: 外扩边框 */
.pg-page .pg-oc-expand:hover {
border-color: #6c5ce7;
outline: 2px solid #6c5ce7;
outline-offset: 4px;
}
/* 效果 2: 虚线外环 */
.pg-page .pg-oc-dashed:hover {
border-color: #0984e3;
outline: 2px dashed #0984e3;
outline-offset: 4px;
}
/* 效果 3: 对比色双框 */
.pg-page .pg-oc-contrast:hover {
border-color: #e17055;
outline: 2px solid #00b894;
outline-offset: 3px;
}
.pg-page .pg-oc-label {
display: block;
font-weight: 900;
font-size: 0.92em;
margin-top: 6px;
}
.pg-page .pg-oc-desc {
display: block;
font-size: 0.82em;
color: #5b626a;
margin-top: 4px;
}
/* ============================================================
22. @keyframes 动画集合
============================================================ */
/* 旋转 */
@keyframes pg-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* 呼吸灯 */
@keyframes pg-breathe {
0%,
100% {
opacity: 0.4;
}
50% {
opacity: 1;
}
}
/* 弹跳 */
@keyframes pg-bounce {
0%,
100% {
transform: translateY(0);
}
50% {
transform: translateY(-10px);
}
}
/* 横向滑入 */
@keyframes pg-slide-in {
from {
transform: translateX(-20px);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
/* 扫光 */
@keyframes pg-shimmer {
0% {
background-position: -200px 0;
}
100% {
background-position: 200px 0;
}
}
/* 打字机光标 */
@keyframes pg-blink {
0%,
100% {
border-right-color: transparent;
}
50% {
border-right-color: #2d3436;
}
}
.pg-page .pg-anim-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-anim-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 180px;
margin: 8px;
padding: 20px 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
text-align: center;
}
.pg-page .pg-anim-demo {
display: inline-block;
width: 32px;
height: 32px;
margin-bottom: 10px;
}
/* 旋转方块 */
.pg-page .pg-ad-spin {
border: 3px solid #6c5ce7;
animation: pg-spin 2s linear infinite;
}
/* 呼吸灯圆点 */
.pg-page .pg-ad-breathe {
width: 24px;
height: 24px;
background: #00b894;
border-radius: 0;
animation: pg-breathe 2s ease infinite;
}
/* 弹跳块 */
.pg-page .pg-ad-bounce {
width: 24px;
height: 24px;
background: #e17055;
animation: pg-bounce 1s ease infinite;
}
/* 滑入块 */
.pg-page .pg-ad-slide {
width: 40px;
height: 8px;
background: #0984e3;
animation: pg-slide-in 1.5s ease infinite;
}
/* 扫光条 */
.pg-page .pg-ad-shimmer {
width: 80px;
height: 16px;
background: linear-gradient(90deg, #e6eaee 0%, #f5f0ff 50%, #e6eaee 100%);
background-size: 200px 100%;
animation: pg-shimmer 1.5s ease infinite;
}
/* 打字机光标 */
.pg-page .pg-ad-blink {
display: inline-block;
font-weight: 900;
font-size: 1.1em;
color: #2d3436;
border-right: 3px solid #2d3436;
padding-right: 4px;
animation: pg-blink 1s step-end infinite;
}
.pg-page .pg-anim-label {
display: block;
font-weight: 900;
font-size: 0.88em;
margin-top: 6px;
}
.pg-page .pg-anim-desc {
display: block;
font-size: 0.78em;
color: #5b626a;
margin-top: 4px;
}
/* ============================================================
23. 瀑布流布局 (Masonry via column-count)
============================================================ */
.pg-page .pg-masonry {
column-count: 3;
column-gap: 12px;
}
.pg-page .pg-masonry-item {
break-inside: avoid;
margin-bottom: 12px;
padding: 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
transition: border-color 200ms ease, box-shadow 200ms ease;
}
.pg-page .pg-masonry-item:hover {
border-color: #a29bfe;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.pg-page .pg-mi-tall {
min-height: 140px;
}
.pg-page .pg-mi-short {
min-height: 60px;
}
.pg-page .pg-mi-med {
min-height: 100px;
}
.pg-page .pg-masonry-title {
font-weight: 900;
font-size: 0.95em;
display: block;
}
.pg-page .pg-masonry-text {
display: block;
font-size: 0.88em;
color: #4b535d;
margin-top: 4px;
line-height: 1.55;
}
.pg-page .pg-masonry-color {
height: 40px;
margin-top: 8px;
}
/* ============================================================
24. Tooltip 悬浮提示 (CSS :hover + ::after)
============================================================ */
.pg-page .pg-tooltip-row {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-tip {
position: relative;
flex: 1 1 calc(25% - 16px);
min-width: 120px;
margin: 8px;
padding: 14px;
border: 2px solid #e6eaee;
text-align: center;
font-weight: 900;
font-size: 0.95em;
background: #fbfcfd;
cursor: default;
transition: border-color 200ms ease;
}
.pg-page .pg-tip:hover {
border-color: #6c5ce7;
}
.pg-page .pg-tip::after {
content: attr(data-tip);
position: absolute;
bottom: 100%;
left: 50%;
margin-left: -80px;
margin-bottom: 6px;
width: 160px;
padding: 6px 10px;
background: #2d3436;
color: #ffffff;
font-size: 0.78em;
font-weight: 400;
line-height: 1.4;
text-align: center;
opacity: 0;
transition: opacity 200ms ease;
z-index: 10;
}
.pg-page .pg-tip:hover::after {
opacity: 1;
}
/* ============================================================
25. 对比卡片 (Comparison Cards)
============================================================ */
.pg-page .pg-compare {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-compare-col {
flex: 1 1 calc(50% - 16px);
min-width: 280px;
margin: 8px;
border: 2px solid #e6eaee;
background: #fbfcfd;
transition: border-color 200ms ease;
}
.pg-page .pg-compare-col:hover {
border-color: #a29bfe;
}
.pg-page .pg-compare-header {
padding: 14px;
border-bottom: 2px solid #e6eaee;
font-weight: 900;
font-size: 1.05em;
text-align: center;
}
.pg-page .pg-ch-yes {
background: #f0faf6;
color: #00b894;
border-bottom-color: #b5e8d5;
}
.pg-page .pg-ch-no {
background: #fef5ee;
color: #e17055;
border-bottom-color: #fad7c0;
}
.pg-page .pg-compare-body {
padding: 14px;
}
.pg-page .pg-compare-item {
padding: 6px 0;
border-bottom: 1px solid #f0f2f5;
font-size: 0.92em;
color: #3f4650;
}
.pg-page .pg-compare-item:last-child {
border-bottom: 0;
}
.pg-page .pg-ci-icon {
display: inline-block;
width: 20px;
margin-right: 6px;
font-weight: 900;
text-align: center;
}
.pg-page .pg-ci-yes {
color: #00b894;
}
.pg-page .pg-ci-no {
color: #e17055;
}
/* ============================================================
新增区域标题颜色
============================================================ */
.pg-page .pg-h-step {
border-left-color: #6c5ce7;
}
.pg-page .pg-h-quote {
border-left-color: #d5cff5;
}
.pg-page .pg-h-pattern {
border-left-color: #a29bfe;
}
.pg-page .pg-h-textfx {
border-left-color: #2d3436;
}
.pg-page .pg-h-pixel {
border-left-color: #e84393;
}
.pg-page .pg-h-outline {
border-left-color: #636e72;
}
.pg-page .pg-h-anim {
border-left-color: #e17055;
}
.pg-page .pg-h-mason {
border-left-color: #0984e3;
}
.pg-page .pg-h-tip {
border-left-color: #fdcb6e;
}
.pg-page .pg-h-compare {
border-left-color: #00cec9;
}
/* ============================================================
响应式补充 (720px)
============================================================ */
@media (max-width: 720px) {
.pg-page .pg-quote {
flex-basis: 100%;
}
.pg-page .pg-pattern-item {
flex-basis: calc(50% - 12px);
}
.pg-page .pg-pixel-card,
.pg-page .pg-anim-card,
.pg-page .pg-outline-card {
flex-basis: calc(50% - 16px);
}
.pg-page .pg-masonry {
column-count: 2;
}
.pg-page .pg-tip {
flex-basis: calc(50% - 16px);
}
.pg-page .pg-compare-col {
flex-basis: 100%;
}
.pg-page .pg-shape-card {
flex-basis: calc(50% - 16px);
}
}
/* ============================================================
26. CSS Border 形状 (Pure Border Shapes)
============================================================ */
.pg-page .pg-shape-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-shape-card {
flex: 1 1 calc(16.666% - 16px);
min-width: 120px;
margin: 8px;
padding: 18px 10px;
border: 1px solid #e6eaee;
background: #fbfcfd;
text-align: center;
transition: border-color 200ms ease;
}
.pg-page .pg-shape-card:hover {
border-color: #a29bfe;
}
.pg-page .pg-shape-demo {
display: inline-block;
margin-bottom: 10px;
}
/* 三角形(向上) */
.pg-page .pg-sh-tri-up {
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-bottom: 32px solid #6c5ce7;
}
/* 三角形(向右) */
.pg-page .pg-sh-tri-right {
width: 0;
height: 0;
border-top: 20px solid transparent;
border-bottom: 20px solid transparent;
border-left: 32px solid #0984e3;
}
/* 菱形 */
.pg-page .pg-sh-diamond {
width: 24px;
height: 24px;
background: #e17055;
transform: rotate(45deg);
}
/* 梯形 */
.pg-page .pg-sh-trapezoid {
width: 40px;
height: 0;
border-bottom: 28px solid #00b894;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
}
/* 对话气泡 */
.pg-page .pg-sh-bubble {
position: relative;
width: 48px;
height: 28px;
background: #fdcb6e;
}
.pg-page .pg-sh-bubble::after {
content: "";
position: absolute;
bottom: -10px;
left: 10px;
width: 0;
height: 0;
border-left: 10px solid transparent;
border-right: 10px solid transparent;
border-top: 10px solid #fdcb6e;
}
/* 平行四边形 */
.pg-page .pg-sh-para {
width: 48px;
height: 28px;
background: #e84393;
transform: skewX(-15deg);
}
.pg-page .pg-shape-label {
display: block;
font-weight: 900;
font-size: 0.82em;
margin-top: 4px;
}
/* ============================================================
27. 竖排文字 (writing-mode)
============================================================ */
.pg-page .pg-vertical-row {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-vertical-card {
flex: 0 0 auto;
margin: 8px;
padding: 18px 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
transition: border-color 200ms ease;
}
.pg-page .pg-vertical-card:hover {
border-color: #00cec9;
}
.pg-page .pg-vt-text {
writing-mode: vertical-rl;
font-weight: 900;
font-size: 1.1em;
line-height: 1.8;
letter-spacing: 0.15em;
}
.pg-page .pg-vt-label {
display: block;
font-size: 0.82em;
color: #5b626a;
margin-top: 8px;
text-align: center;
}
/* ============================================================
28. 斑马纹 (:nth-child)
============================================================ */
.pg-page .pg-zebra {
border: 1px solid #e6eaee;
overflow: hidden;
}
.pg-page .pg-zebra-header {
display: flex;
padding: 10px 14px;
background: #2d3436;
color: #ffffff;
font-weight: 900;
font-size: 0.88em;
}
.pg-page .pg-zebra-row {
display: flex;
padding: 8px 14px;
font-size: 0.92em;
border-bottom: 1px solid #f0f2f5;
transition: background 120ms ease;
}
.pg-page .pg-zebra-row:nth-child(even) {
background: #f8f9fb;
}
.pg-page .pg-zebra-row:hover {
background: #f0f5ff;
}
.pg-page .pg-zebra-row:last-child {
border-bottom: 0;
}
.pg-page .pg-zc {
flex: 1;
}
.pg-page .pg-zc-name {
font-weight: 900;
}
/* ============================================================
29. 文字省略 (Text Ellipsis)
============================================================ */
.pg-page .pg-ellipsis-demo {
margin-top: 10px;
padding: 12px 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
}
.pg-page .pg-ellipsis-demo+.pg-ellipsis-demo {
margin-top: 8px;
}
.pg-page .pg-ell-single {
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: 900;
}
.pg-page .pg-ell-label {
display: block;
font-size: 0.78em;
color: #636e72;
margin-bottom: 4px;
}
/* ============================================================
30. 渐变边框 (border-image)
============================================================ */
.pg-page .pg-bi-grid {
display: flex;
flex-wrap: wrap;
margin: -8px;
}
.pg-page .pg-bi-card {
flex: 1 1 calc(33.333% - 16px);
min-width: 200px;
margin: 8px;
padding: 18px 14px;
background: #fbfcfd;
transition: box-shadow 200ms ease;
}
.pg-page .pg-bi-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.pg-page .pg-bi-violet {
border: 3px solid;
border-image: linear-gradient(135deg, #a29bfe, #6c5ce7) 1;
}
.pg-page .pg-bi-ocean {
border: 3px solid;
border-image: linear-gradient(135deg, #74b9ff, #00b894) 1;
}
.pg-page .pg-bi-sunset {
border: 3px solid;
border-image: linear-gradient(135deg, #fd79a8, #fdcb6e) 1;
}
.pg-page .pg-bi-label {
font-weight: 900;
font-size: 0.95em;
display: block;
}
.pg-page .pg-bi-desc {
display: block;
font-size: 0.85em;
color: #5b626a;
margin-top: 4px;
}
.pg-page .pg-bi-code {
display: block;
font-size: 0.78em;
color: #636e72;
margin-top: 6px;
font-family: "Courier New", Courier, monospace;
}
/* ============================================================
新增区域标题颜色
============================================================ */
.pg-page .pg-h-shape {
border-left-color: #a29bfe;
}
.pg-page .pg-h-vert {
border-left-color: #00cec9;
}
.pg-page .pg-h-zebra {
border-left-color: #2d3436;
}
.pg-page .pg-h-ell {
border-left-color: #636e72;
}
.pg-page .pg-h-bi {
border-left-color: #fd79a8;
}
.pg-page .pg-h-summary {
border-left-color: #e17055;
}
/* ============================================================
总结区域 (Summary / 能力边界文档)
============================================================ */
.pg-page .pg-summary {
margin-top: 12px;
}
.pg-page .pg-sum-group {
margin-top: 16px;
padding: 14px;
border: 1px solid #e6eaee;
background: #fbfcfd;
}
.pg-page .pg-sum-group+.pg-sum-group {
margin-top: 12px;
}
.pg-page .pg-sum-title {
font-weight: 900;
font-size: 1em;
display: block;
padding-bottom: 8px;
margin-bottom: 10px;
border-bottom: 1px solid #e6eaee;
}
.pg-page .pg-sum-list {
margin: 0;
padding: 0;
}
.pg-page .pg-sum-item {
padding: 4px 0;
font-size: 0.92em;
color: #3f4650;
line-height: 1.55;
border-bottom: 1px solid #f5f6f8;
}
.pg-page .pg-sum-item:last-child {
border-bottom: 0;
}
.pg-page .pg-sum-ok {
display: inline-block;
width: 20px;
color: #00b894;
font-weight: 900;
margin-right: 4px;
}
.pg-page .pg-sum-no {
display: inline-block;
width: 20px;
color: #e17055;
font-weight: 900;
margin-right: 4px;
}
.pg-page .pg-sum-warn {
display: inline-block;
width: 20px;
color: #fdcb6e;
font-weight: 900;
margin-right: 4px;
}
.pg-page .pg-sum-note {
margin-top: 12px;
padding: 10px 14px;
border-left: 4px solid #fdcb6e;
background: #fffcf0;
font-size: 0.88em;
color: #3f4650;
line-height: 1.55;
}
/* ============================================================
响应式补充 (720px) — 新增组件
============================================================ */
@media (max-width: 720px) {
.pg-page .pg-shape-card {
flex-basis: calc(33.333% - 16px);
}
.pg-page .pg-bi-card {
flex-basis: calc(50% - 16px);
}
}
@media (max-width: 480px) {
.pg-page .pg-shape-card {
flex-basis: calc(50% - 16px);
}
.pg-page .pg-bi-card {
flex-basis: 100%;
}
}