模板:轮播图:修订间差异

来自Age Of History 2 Chinese Wiki
跳转至:导航、​搜索
无编辑摘要
无编辑摘要
第1行: 第1行:
<includeonly>
<includeonly>
<div class="wiki-carousel-container">
<div class="modern-carousel">
   <div class="wiki-carousel">
   <div class="carousel-container">
     <div class="wiki-carousel-slides">
     <div class="carousel-track">
       {{{content}}}
       {{{content}}}
     </div>
     </div>
    <div class="wiki-carousel-indicators"></div>
  </div>
     <div class="wiki-carousel-btn wiki-carousel-prev" aria-label="上一张"></div>
  <div class="carousel-navigation">
     <div class="wiki-carousel-next wiki-carousel-btn" aria-label="下一张"></div>
     <button class="carousel-button prev"></button>
     <button class="carousel-button next"></button>
   </div>
   </div>
</div>
</div>
第17行: 第18行:
== 用法 ==
== 用法 ==
<pre>
<pre>
{{轮播图
{{Carousel
|content=
|content=
{{Carousel/Slide
{{CarouselItem
|image=图片1.jpg
|image=Example1.jpg
|title=标题1
|title=First Item
|text=描述文本1
|description=This is the description for the first carousel item
|link=链接页面1
|link=Article1
}}
{{CarouselItem
|image=Example2.jpg
|title=Second Item
|description=This is the description for the second carousel item
|link=Article2
}}
}}
{{Carousel/Slide
{{CarouselItem
|image=图片2.jpg
|image=Example3.jpg
|title=标题2
|title=Third Item
|text=描述文本2
|description=This is the description for the third carousel item
|link=链接页面2
|link=Article3
}}
}}
}}
}}
第38行: 第45行:


== 另见 ==
== 另见 ==
* [[Template:Carousel/Slide]]: 轮播图中单个幻灯片的模板
* [[Template:CarouselItem]]: 轮播图中单个幻灯片的模板
</noinclude>
</noinclude>

2025年5月1日 (四) 19:43的版本


描述

此模板用于在维基页面上创建一个轮播图展示框,可以用来展示多个幻灯片内容。

用法

{{Carousel
|content=
{{CarouselItem
|image=Example1.jpg
|title=First Item
|description=This is the description for the first carousel item
|link=Article1
}}
{{CarouselItem
|image=Example2.jpg
|title=Second Item
|description=This is the description for the second carousel item
|link=Article2
}}
{{CarouselItem
|image=Example3.jpg
|title=Third Item
|description=This is the description for the third carousel item
|link=Article3
}}
}}

参数

  • content: 包含多个幻灯片的内容

另见