fix(frontend): restore banner carousel visible height

Global border-box collapsed the banner's height:0 + padding-bottom
aspect box to zero, so slides rendered but took no space. Prefer
aspect-ratio (with content-box fallback) and make .new-swiper honor
data-swiper-config so autoplay/loop/navigation from templates apply.
This commit is contained in:
2026-07-14 23:26:03 +08:00
parent 41e4719621
commit 666560a49a
3 changed files with 155 additions and 30 deletions
+13 -2
View File
@@ -175,9 +175,20 @@
--scale-height: 40%;
--pc-height: 100%;
--m-height: 100%;
padding-bottom: var(--scale-height);
width: 100%;
height: 0;
height: auto;
/* Prefer aspect-ratio so global border-box cannot collapse the box. */
aspect-ratio: 5 / 2;
padding-bottom: 0;
}
@supports not (aspect-ratio: 1 / 1) {
.scale-height {
height: 0;
padding-bottom: var(--scale-height);
box-sizing: content-box;
aspect-ratio: auto;
}
}
.scale-height .swiper-wrapper,