模板:轮播图:修订间差异
跳转到导航
跳转到搜索
(创建页面,内容为“<div class="carousel"> <div class="carousel-images"> {{#ask: Category:Images |?image |?link |format=template |template=轮播图模板 |limit=10 }} </div> <div class="prev" onclick="moveSlide(-1)"><</div> <div class="next" onclick="moveSlide(1)">></div> <div class="indicators"> {{#ask:Category:Images |format=template |template=指示器 |limit=10 }} </div> </div> {{#css:.carouse…”) |
无编辑摘要 标签:手工回退 |
||
(未显示同一用户的5个中间版本) | |||
第1行: | 第1行: | ||
<div class=" | <div class="slider-container"> | ||
<div class=" | <div class="slider" id="slider"></div> | ||
<div class="arrow prev" id="sliderPrev"><</div> | |||
<div class="arrow next" id="sliderNext">></div> | |||
<div class="dots" id="dotsContainer"></div> | |||
<div class="prev" | |||
<div class="next" | |||
<div class=" | |||
</div> | </div> | ||
{{#css:. | {{#Widget:轮播图}} | ||
{{#css: | |||
.slider-container { | |||
position: relative; | position: relative; | ||
width: 100%; | width: 100%; | ||
} | } | ||
. | .slider { | ||
position: relative; | |||
width: 100%; | |||
height: 469px; | |||
overflow: hidden; | |||
} | } | ||
. | .slider img { | ||
opacity: 0; | |||
width: 100%; | |||
height: 100%; | |||
object-fit: cover; | |||
object-position: center; | |||
transition: opacity 700ms ease-in-out; | |||
position: absolute; | |||
} | } | ||
.arrow { | |||
cursor: pointer; | |||
position: absolute; | position: absolute; | ||
top: 50%; | top: 50%; | ||
width: auto; | |||
padding: 16px; | |||
border: none; | margin-top: -22px; | ||
color: white; | |||
font-weight: bold; | |||
font-size: 18px; | |||
transition: 0.6s ease; | |||
border-radius: 0 3px 3px 0; | |||
user-select: none; | |||
-webkit-user-select: none; | |||
} | |||
.next { | |||
right: 0; | |||
border-radius: 3px 0 0 3px; | |||
} | |||
.prev:hover, .next:hover { | |||
background-color: rgba(0, 0, 0, 0.8); | |||
} | } | ||
.dots { | |||
width: max-content; | |||
text-align: center; | |||
position: absolute; | |||
left: 0; | left: 0; | ||
right: 0; | right: 0; | ||
bottom: 43px; | |||
margin: auto; | |||
} | } | ||
. | .dot { | ||
height: 12px; | |||
width: 94px; | |||
margin: 0 22px; | |||
background-color: #D9D9D9; | |||
display: inline-block; | display: inline-block; | ||
cursor: pointer; | cursor: pointer; | ||
transition: background-color 0.6s ease; | |||
} | |||
.dot.active { | |||
background-color: #717171; | |||
} | } | ||
}} | }} |
2024年8月18日 (日) 12:36的最新版本