From d0755aa46694b37038cbfe7227090ad37d589fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B5=85=E5=BF=B5?= Date: Tue, 29 Sep 2026 14:22:46 +0800 Subject: [PATCH] =?UTF-8?q?style(viewer):=20=E5=B9=BF=E5=91=8A=E8=BD=AE?= =?UTF-8?q?=E6=92=AD=E5=8E=BB=E5=9B=BA=E5=AE=9A=E6=AF=94=E4=BE=8B=E2=80=94?= =?UTF-8?q?=E2=80=94=E6=B4=BB=E8=B7=83=E5=B8=A7=E6=92=91=E8=87=AA=E7=84=B6?= =?UTF-8?q?=E9=AB=98=E5=BA=A6=EF=BC=88=E8=BF=90=E8=90=A5=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E7=BB=9F=E4=B8=80=E9=AB=98=E5=BA=A6=E5=9B=BE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Code --- apps/viewer/src/components/ads/AdCarousel.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/viewer/src/components/ads/AdCarousel.vue b/apps/viewer/src/components/ads/AdCarousel.vue index 32efdc6..bff23ae 100644 --- a/apps/viewer/src/components/ads/AdCarousel.vue +++ b/apps/viewer/src/components/ads/AdCarousel.vue @@ -136,8 +136,6 @@ function openAd(ad: PublicAd): void { .ad-carousel { position: relative; width: 100%; - /* 堆叠帧的高度锚点(各帧自然高度不一致会让切换时容器跳动);建议素材 1200×360 */ - aspect-ratio: 10 / 3; margin: 16px 0; overflow: hidden; border-radius: var(--viewer-radius-img); @@ -153,6 +151,9 @@ function openAd(ad: PublicAd): void { height: 100%; } .ad-slide { + /* 非活跃帧绝对叠放(淡出层,cover 吸收与活跃帧的细微高度差);活跃帧 + * 回归文档流撑起容器高度——图片自然高度即轮播高度(2026-09-29 用户定稿: + * 运营上传统一高度图片,容器不用固定比例锚点)。 */ position: absolute; inset: 0; display: block; @@ -169,6 +170,9 @@ function openAd(ad: PublicAd): void { pointer-events: none; } .ad-slide.active { + position: relative; + inset: auto; + height: auto; opacity: 1; pointer-events: auto; }