- tokens:收紧 surface 层级/边框/圆角/阴影/间距与暗黑基线 - 组件:按钮、卡片原语、导航、侧栏、分页、模态、浮动按钮 - 首页:hero 外壳、fixed 列表/宫格、tab、skeleton/error 及各运营模块卡片化 - 内容页:单篇封面/标题/正文/blockquote/相关/TOC/上一篇下一篇、评论区 - 社区:forum board/topic/compose 子控件与卡片体系 - 交易/认证:cart/orders/revenue/product/auth 表面块与模态浮层统一 - footer:页脚主体、社交/联系、移动端 tabbar/搜索覆盖
180 lines
4.1 KiB
CSS
180 lines
4.1 KiB
CSS
/* ============================================================
|
||
* AKSRT Header Slider — v5.0 Zibll-Aligned
|
||
*
|
||
* 三层架构:
|
||
* - Layer 1: Swiper 全宽轮播背景
|
||
* - Layer 2: 搜索覆盖模块
|
||
* - Layer 3: 图标卡片网格覆盖
|
||
*
|
||
* 对标 zibll 的 new-swiper 体系:
|
||
* - CSS 变量高度控制 (--pc-height / --m-height)
|
||
* - data-* 属性驱动配置
|
||
* - 缩略图分页器、视差、懒加载
|
||
* ============================================================ */
|
||
|
||
/* ============================================================
|
||
* .new-swiper 基础样式(对标 zibll)
|
||
* ============================================================ */
|
||
.aksrt-slider-wrapper {
|
||
position: relative;
|
||
margin-bottom: 24px;
|
||
border-radius: var(--radius-2xl, 16px);
|
||
overflow: hidden;
|
||
box-shadow: var(--shadow);
|
||
}
|
||
|
||
.new-swiper {
|
||
position: relative;
|
||
overflow: hidden;
|
||
--pc-height: auto;
|
||
--m-height: auto;
|
||
}
|
||
|
||
.new-swiper .swiper-wrapper {
|
||
height: var(--pc-height);
|
||
}
|
||
|
||
.new-swiper .swiper-slide {
|
||
position: relative;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.new-swiper .swiper-slide img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
/* 懒加载预加载器 */
|
||
.new-swiper .swiper-lazy-preloader {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
width: 42px;
|
||
height: 42px;
|
||
margin: -21px 0 0 -21px;
|
||
border: 3px solid rgba(255,255,255,0.3);
|
||
border-top-color: #fff;
|
||
border-radius: 50%;
|
||
animation: aksrt-swiper-spin 0.8s linear infinite;
|
||
}
|
||
|
||
@keyframes aksrt-swiper-spin {
|
||
from { transform: rotate(0deg); }
|
||
to { transform: rotate(360deg); }
|
||
}
|
||
|
||
/* 懒加载图片 */
|
||
.new-swiper .swiper-lazy {
|
||
opacity: 0;
|
||
transition: opacity 0.3s;
|
||
}
|
||
|
||
.new-swiper .swiper-lazy.lazyloaded,
|
||
.new-swiper .swiper-slide-visible .swiper-lazy {
|
||
opacity: 1;
|
||
}
|
||
|
||
/* 缩略图分页器 */
|
||
.new-swiper .pagination-thumbnail-item {
|
||
width: 60px;
|
||
height: 40px;
|
||
border-radius: 4px;
|
||
overflow: hidden;
|
||
opacity: 0.5;
|
||
transition: opacity 0.3s, border-color 0.3s;
|
||
border: 2px solid transparent;
|
||
cursor: pointer;
|
||
display: inline-block;
|
||
}
|
||
|
||
.new-swiper .pagination-thumbnail-item img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.new-swiper .pagination-thumbnail-item-active {
|
||
opacity: 1;
|
||
border-color: #fff;
|
||
}
|
||
|
||
/* 视差层 */
|
||
.new-swiper [data-swiper-parallax] {
|
||
transition: none;
|
||
}
|
||
|
||
/* 比例高度模式 */
|
||
.new-swiper.scale-height .swiper-wrapper {
|
||
height: 0;
|
||
padding-bottom: var(--scale-ratio, 45%);
|
||
}
|
||
|
||
/* 幻灯片文字覆盖层 */
|
||
.aksrt-slide-text {
|
||
position: absolute;
|
||
top: 50%;
|
||
left: 50%;
|
||
transform: translate(-50%, -50%);
|
||
z-index: 2;
|
||
width: calc(100% - 32px);
|
||
max-width: 920px;
|
||
text-align: center;
|
||
color: #fff;
|
||
}
|
||
|
||
.aksrt-slide-text__title {
|
||
font-family: var(--font-display, var(--font-ui));
|
||
font-size: clamp(1.75rem, 4vw, 3rem);
|
||
font-weight: 700;
|
||
margin: 0 0 12px;
|
||
line-height: 1.2;
|
||
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
|
||
}
|
||
|
||
.aksrt-slide-text__desc {
|
||
font-size: clamp(0.9rem, 1.4vw, 1.125rem);
|
||
margin: 0;
|
||
line-height: 1.6;
|
||
color: rgba(255, 255, 255, 0.9);
|
||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||
}
|
||
|
||
/* 移动端高度 */
|
||
@media (max-width: 767px) {
|
||
.new-swiper .swiper-wrapper {
|
||
height: var(--m-height);
|
||
}
|
||
}
|
||
|
||
/* ============================================================
|
||
* Container — 三层叠加的父容器
|
||
* ============================================================ */
|
||
.header-components-container {
|
||
position: relative;
|
||
isolation: isolate; /* 创建独立堆叠上下文,内部 z-index 不外泄 */
|
||
width: 100%;
|
||
margin-bottom: 24px;
|
||
}
|
||
|
||
/* ============================================================
|
||
* Device Visibility for Hero/Banner slides
|
||
* ============================================================ */
|
||
|
||
/* PC-only slides: hidden on mobile */
|
||
@media (max-width: 767.98px) {
|
||
.hero-slide--pc-only,
|
||
.banner-slide--pc-only {
|
||
display: none !important;
|
||
}
|
||
}
|
||
|
||
/* Mobile-only slides: hidden on PC */
|
||
@media (min-width: 768px) {
|
||
.hero-slide--mobile-only,
|
||
.banner-slide--mobile-only {
|
||
display: none !important;
|
||
}
|
||
}
|
||
|