轮播图:修订间差异
来自卡厄思梦境WIKI
小无编辑摘要 |
小无编辑摘要 |
||
| 第3行: | 第3行: | ||
{{#if:{{{图1|}}}| | {{#if:{{{图1|}}}| | ||
<div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | <div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | ||
[[File:{{{图1}}}|center|link=]] | [[File:{{{图1}}}|center|350px|link=]] | ||
</div> | </div> | ||
}} | }} | ||
{{#if:{{{图2|}}}| | {{#if:{{{图2|}}}| | ||
<div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | <div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | ||
[[File:{{{图2}}}|center|link=]] | [[File:{{{图2}}}|center|350px|link=]] | ||
</div> | </div> | ||
}} | }} | ||
{{#if:{{{图3|}}}| | {{#if:{{{图3|}}}| | ||
<div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | <div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | ||
[[File:{{{图3}}}|center|link=]] | [[File:{{{图3}}}|center|350px|link=]] | ||
</div> | </div> | ||
}} | }} | ||
{{#if:{{{图4|}}}| | {{#if:{{{图4|}}}| | ||
<div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | <div class="carousel-slide" style="min-width: 100%; height: 100%; position: relative;"> | ||
[[File:{{{图4}}}|center|link=]] | [[File:{{{图4}}}|center|350px|link=]] | ||
</div> | </div> | ||
}} | }} | ||
</div> | |||
<!-- 标题遮罩层 --> | |||
<div class="carousel-titles-overlay" style="position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.6)); padding: 20px 0 15px;"> | |||
<div class="carousel-titles-container" style="display: flex; justify-content: center; align-items: flex-end; gap: 15px; padding: 0 50px;"> | |||
{{#if:{{{图1标题|}}}| | |||
<div class="carousel-title-item active" data-slide="0" style="flex: 1; max-width: 250px; cursor: pointer;"> | |||
<div class="title-text" style="color: white; font-size: 14px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;">{{{图1标题}}}</div> | |||
<div class="title-indicator" style="height: 3px; background: #ff6600; margin-top: 8px; transition: all 0.3s;"></div> | |||
</div> | |||
}} | |||
{{#if:{{{图2标题|}}}| | |||
<div class="carousel-title-item" data-slide="1" style="flex: 1; max-width: 250px; cursor: pointer;"> | |||
<div class="title-text" style="color: white; font-size: 14px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; opacity: 0.7;">{{{图2标题}}}</div> | |||
<div class="title-indicator" style="height: 3px; background: transparent; margin-top: 8px; transition: all 0.3s;"></div> | |||
</div> | |||
}} | |||
{{#if:{{{图3标题|}}}| | |||
<div class="carousel-title-item" data-slide="2" style="flex: 1; max-width: 250px; cursor: pointer;"> | |||
<div class="title-text" style="color: white; font-size: 14px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; opacity: 0.7;">{{{图3标题}}}</div> | |||
<div class="title-indicator" style="height: 3px; background: transparent; margin-top: 8px; transition: all 0.3s;"></div> | |||
</div> | |||
}} | |||
{{#if:{{{图4标题|}}}| | |||
<div class="carousel-title-item" data-slide="3" style="flex: 1; max-width: 250px; cursor: pointer;"> | |||
<div class="title-text" style="color: white; font-size: 14px; padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; opacity: 0.7;">{{{图4标题}}}</div> | |||
<div class="title-indicator" style="height: 3px; background: transparent; margin-top: 8px; transition: all 0.3s;"></div> | |||
</div> | |||
}} | |||
</div> | |||
</div> | </div> | ||
<!-- 左右切换按钮 --> | <!-- 左右切换按钮 --> | ||
< | <div class="carousel-btn carousel-prev" style="position: absolute; left: 10px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; width: 40px; height: 40px; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: background 0.3s;"> | ||
< | <span style="display: inline-block; transform: translateX(-2px);">‹</span> | ||
</div> | |||
<div class="carousel-btn carousel-next" style="position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.5); color: white; width: 40px; height: 40px; cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; transition: background 0.3s;"> | |||
<span style="display: inline-block; transform: translateX(2px);">›</span> | |||
</div> | </div> | ||
</div></includeonly><noinclude> | </div></includeonly><noinclude> | ||