fix(hero): align header slider title/search stack with zibll
Put hero main title/subtitle in search before_html (document flow), move the search overlay outside the swiper as a sibling, and reset search/slide-text positioning to zibll tops so title and search no longer overlap.
This commit is contained in:
1 parent
e7ccc4f069
commit
397231ca75
12 files changed
+476
-439
No files matched your search
@@ -21,10 +21,8 @@
|
||||
|
||||
/* Fixed homepage hero under-nav is owned by nav/base.css (body.nav-fixed). */
|
||||
|
||||
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
|
||||
|
||||
/* ============================================================
|
||||
* Layer 1: Swiper 轮播
|
||||
* Layer 1: Swiper shell
|
||||
* ============================================================ */
|
||||
.header-components {
|
||||
position: relative;
|
||||
@@ -37,23 +35,23 @@
|
||||
background: #111;
|
||||
}
|
||||
|
||||
/* slide-header 模式:背景保持满铺,仅将文本层下移避开导航 */
|
||||
.header-components.slide-header {
|
||||
padding-top: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* zibll: .slide-header .slide-text { padding-top: 70px; } — nav clearance only */
|
||||
.header-components.slide-header .slide-text,
|
||||
.header-components.slide-header .header-components__content.slide-text {
|
||||
padding-top: var(--nav-fixed-reserve, var(--nav-height, 60px));
|
||||
padding-top: 70px;
|
||||
}
|
||||
|
||||
/* WordPress Admin Bar 已全局禁用,无需偏移规则 */
|
||||
|
||||
/* 渐变兜底 */
|
||||
/* Gradient fallback */
|
||||
.header-components--gradient {
|
||||
background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-active, var(--color-primary-dark)) 100%);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
display: block;
|
||||
position: relative;
|
||||
height: var(--pc-height);
|
||||
}
|
||||
|
||||
.header-components--gradient::before {
|
||||
@@ -65,7 +63,6 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Swiper 内部 */
|
||||
.header-components .swiper-wrapper {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -80,7 +77,6 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* 幻灯片背景图 */
|
||||
.header-components__slide-bg {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -100,7 +96,6 @@
|
||||
background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
|
||||
}
|
||||
|
||||
/* 视频背景 */
|
||||
.header-components__video {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -110,7 +105,6 @@
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* 图片图层(视差叠加) */
|
||||
.header-components__layer {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -130,18 +124,16 @@
|
||||
transform: translateY(calc(var(--scroll-y, 0) * var(--layer-parallax-scale, 0.3) * 1px));
|
||||
}
|
||||
|
||||
/* 文字视差 */
|
||||
/* Text parallax — keep abs-center vertical model (translateY only when abs-center is full-width) */
|
||||
.has-text-parallax {
|
||||
will-change: transform;
|
||||
transform: translate(-50%, calc(-50% + var(--scroll-y, 0) * var(--hero-text-parallax, 0) * 0.15px));
|
||||
}
|
||||
|
||||
/* 文字尺寸覆盖 */
|
||||
.header-components__content[style*="--hero-text-size-pc"] .slide-title {
|
||||
font-size: var(--hero-text-size-pc);
|
||||
.header-components__content[style*="--hero-text-size-pc"] .slide-title,
|
||||
.header-components__content[style*="--text-size-pc"] .slide-title {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
/* 幻灯片遮罩 — 轻量压暗(zibll 以 .s-desc 底条为主) */
|
||||
.header-components__slide-overlay {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
@@ -155,7 +147,7 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* zibll .s-desc 底条文案 */
|
||||
/* Bottom-bar .s-desc mode */
|
||||
.header-components__content.s-desc,
|
||||
.header-components__content.slide-text.s-desc {
|
||||
top: auto;
|
||||
@@ -185,25 +177,71 @@
|
||||
background: unset;
|
||||
}
|
||||
|
||||
/* 搜索层 — header-slider-search */
|
||||
.header-components-search {
|
||||
/* ============================================================
|
||||
* Layer 2: Search — zibll .header-slider-search
|
||||
* Full-width abs-center + fine-tuned top (NOT point-centered).
|
||||
* Title/subtitle are in .header-slider-search-more.before (flow).
|
||||
* ============================================================ */
|
||||
.header-slider-search.abs-center,
|
||||
.header-components-search.abs-center {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
top: calc(50% - 10px);
|
||||
transform: translate(-50%, -50%);
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
margin: auto;
|
||||
max-width: 840px;
|
||||
padding: 0 20px;
|
||||
font-size: 17px;
|
||||
color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.header-slider-search,
|
||||
.header-components-search {
|
||||
max-width: 840px;
|
||||
width: calc(100% - 40px);
|
||||
margin: auto;
|
||||
padding: 0 20px;
|
||||
font-size: 17px;
|
||||
top: calc(50% - 10px);
|
||||
z-index: 2;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.card-0 .header-slider-search,
|
||||
.card-0 .header-components-search {
|
||||
top: calc(50% + 20px);
|
||||
}
|
||||
|
||||
.header-slider-search .search-input,
|
||||
.header-components-search .search-input {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.header-slider-search-more {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.header-slider-search-more.before {
|
||||
margin-bottom: 1.8em;
|
||||
}
|
||||
|
||||
.header-slider-search .search-form,
|
||||
.header-components-search .search-form {
|
||||
margin: 0;
|
||||
display: block;
|
||||
background: transparent;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
box-shadow: none;
|
||||
-webkit-backdrop-filter: none;
|
||||
backdrop-filter: none;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.header-slider-search .line-form,
|
||||
.header-components-search .line-form {
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
border-radius: 100px;
|
||||
@@ -212,8 +250,12 @@
|
||||
color: #555;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.has-blur-pc .header-slider-search .line-form,
|
||||
.has-blur-mobile .header-slider-search .line-form,
|
||||
.filter-blur .header-slider-search .line-form,
|
||||
.has-blur-pc .header-components-search .line-form,
|
||||
.has-blur-mobile .header-components-search .line-form,
|
||||
.filter-blur .header-components-search .line-form {
|
||||
@@ -221,12 +263,17 @@
|
||||
backdrop-filter: saturate(5) blur(20px);
|
||||
}
|
||||
|
||||
.header-slider-search .line-form .icon,
|
||||
.header-slider-search .line-form a,
|
||||
.header-components-search .line-form .icon,
|
||||
.header-components-search .line-form a {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* 图标卡 — header-slider-card margin-top:-40px */
|
||||
/* ============================================================
|
||||
* Layer 3: Icon cards — margin-top:-40px (zibll)
|
||||
* ============================================================ */
|
||||
.header-slider-card,
|
||||
.header-components-card {
|
||||
position: relative;
|
||||
margin-top: -40px;
|
||||
@@ -248,62 +295,43 @@
|
||||
background: var(--blur-bg);
|
||||
}
|
||||
|
||||
.header-components.slide-header {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.header-components.slide-header .swiper-slide img,
|
||||
.header-components.slide-header .header-components__slide-bg img {
|
||||
border-radius: 0 !important;
|
||||
}
|
||||
|
||||
|
||||
/* 幻灯片文字内容 */
|
||||
.header-components__content {
|
||||
position: absolute;
|
||||
bottom: auto;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
z-index: 2;
|
||||
width: calc(100% - 32px);
|
||||
max-width: 920px;
|
||||
text-align: center;
|
||||
/* Decorative slide text content (not the main hero stack) */
|
||||
.header-components__content.slide-text:not(.s-desc) {
|
||||
/* Placement comes from .abs-center + optional alignment modifiers */
|
||||
z-index: 1;
|
||||
color: #fff;
|
||||
max-width: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.header-components__title,
|
||||
.header-components .slide-title {
|
||||
font-family: var(--font-ui);
|
||||
font-size: clamp(1.5rem, 3.2vw, 2.25rem);
|
||||
font-weight: 600;
|
||||
margin: 0 0 12px;
|
||||
line-height: 1.25;
|
||||
margin: 0;
|
||||
line-height: 1.35;
|
||||
letter-spacing: 0;
|
||||
color: #fff;
|
||||
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.header-components__subtitle {
|
||||
font-size: clamp(0.9rem, 1.4vw, 1.125rem);
|
||||
margin: 0;
|
||||
max-width: 680px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
line-height: 1.6;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
|
||||
.header-components__subtitle,
|
||||
.header-components .slide-desc {
|
||||
margin: 0.6em 0 0;
|
||||
line-height: 1.5;
|
||||
color: rgba(255, 255, 255, 0.95);
|
||||
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.header-components__description {
|
||||
font-size: clamp(0.8rem, 1.2vw, 0.95rem);
|
||||
margin: 8px auto 0;
|
||||
max-width: 600px;
|
||||
font-size: 0.85em;
|
||||
margin: 0.4em 0 0;
|
||||
line-height: 1.5;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
text-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user