style(viewer): 广告轮播去固定比例——活跃帧撑自然高度(运营上传统一高度图)
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -136,8 +136,6 @@ function openAd(ad: PublicAd): void {
|
|||||||
.ad-carousel {
|
.ad-carousel {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
/* 堆叠帧的高度锚点(各帧自然高度不一致会让切换时容器跳动);建议素材 1200×360 */
|
|
||||||
aspect-ratio: 10 / 3;
|
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: var(--viewer-radius-img);
|
border-radius: var(--viewer-radius-img);
|
||||||
@@ -153,6 +151,9 @@ function openAd(ad: PublicAd): void {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
.ad-slide {
|
.ad-slide {
|
||||||
|
/* 非活跃帧绝对叠放(淡出层,cover 吸收与活跃帧的细微高度差);活跃帧
|
||||||
|
* 回归文档流撑起容器高度——图片自然高度即轮播高度(2026-09-29 用户定稿:
|
||||||
|
* 运营上传统一高度图片,容器不用固定比例锚点)。 */
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
display: block;
|
display: block;
|
||||||
@@ -169,6 +170,9 @@ function openAd(ad: PublicAd): void {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.ad-slide.active {
|
.ad-slide.active {
|
||||||
|
position: relative;
|
||||||
|
inset: auto;
|
||||||
|
height: auto;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user