1
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yiqiu
2025-11-21 19:31:49 +08:00
parent a26d8e2d30
commit 5d15e2f48c
2 changed files with 66 additions and 98 deletions

View File

@@ -1,61 +1,37 @@
/* banner */
.banner {
.banner-cont {
position: relative;
background: #f7f9fa;
width: 100%;
overflow: hidden;
}
/* 轮播图作为背景层,图片负责铺满顶部区域 */
.banner-bg {
.banner-cont .swiper-slide {
width: 100%;
background: linear-gradient(0, #f7f9fa, #f9fafb);
}
.banner-cont .swiper-slide .img {
/* 图片撑开高度,避免被裁切 */
display: block;
width: 100%;
height: auto;
max-width: 100%;
}
/* 文案层:覆盖在轮播上,使用 section-content 控制左右宽度 */
.banner-cont .banner-text {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 420px;
overflow: hidden;
}
.banner-bg .banner-cont,
.banner-bg .banner-cont .swiper-wrapper,
.banner-bg .banner-cont .swiper-slide {
height: 100%;
}
.banner-bg .banner-cont .swiper-slide {
background: transparent;
}
.banner-bg .banner-cont .swiper-slide .img {
top: 0;
width: 100%;
height: 100%;
object-fit: cover;
}
.banner-bg .banner-cont .swiper-pagination {
bottom: 24px;
}
.banner-bg .banner-cont .swiper-pagination-bullet {
width: 36px;
height: 4px;
background: #D7DCE4;
opacity: 1;
border-radius: 3px;
}
.banner-bg .banner-cont .swiper-pagination-bullet-active {
background: rgba(255, 103, 57, 1);
}
/* 文案 + 下方模块共用一个 section-content 容器,天然同宽 */
.banner-main {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
justify-content: space-between; /* 文案在上banner-s 靠容器底部 */
min-height: 420px; /* 与 .banner-bg 高度保持一致 */
padding-top: 80px; /* 文案距离顶部的内边距 */
align-items: flex-start; /* 文案从上方开始 */
pointer-events: none;
}
.banner-cont .banner-text .section-content {
padding-top: 80px; /* 文案距顶部 */
padding-bottom: 0;
}
@@ -82,12 +58,6 @@
pointer-events: auto;
}
/* banner 区域内的 section-content 不需要额外的上下 padding由 .banner-main 控制 */
.banner .section-content {
padding-top: 0;
padding-bottom: 0;
}
.banner .banner-s {
box-shadow: 0px 0px 16px rgba(52, 52, 52, 0.16);
border-radius: 3px;