style(viewer): 广告轮播去固定比例——活跃帧撑自然高度(运营上传统一高度图)

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-09-29 14:22:46 +08:00
parent 07f81ff59b
commit d0755aa466
@@ -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;
}