Template:Multiple images
外观
使用Lua語言編寫:
本模板用於將二至六張圖片並列(橫向或縱向)顯示在一個框內。您可替所有圖片輸入一個說明,或為每張圖片輸入獨立說明。
如果图片分繁简显示,请参考#繁简转换章节。
用法
[编辑]- 參數解說
- header(標題)、footer(框底)、background color及各圖片的caption均是選填參數。
- align:圖片框的對齊方式(left/right/center),預設值為「置中對齊」(center)
- direction:圖片的排列方式(horizontal/vertical),預設值為「橫向」(horizontal)
- header_align:圖片框標題的對齊方式(left/right/center),預設值為「置中對齊」(center)
- footer_align:圖片框框底的對齊方式(left/right/center),預設值為「靠左對齊」(left)
- image1、image2等:顯示的圖片名稱(不需輸入File:或Image:)
- width1、width2等:圖片寬度,以像素為單位(不需輸入px)
- alt1、alt2等:圖片不能顯示時的替代文字
- caption1、caption2等:圖片的獨立說明
- width:所有圖片的寬度,使用後將自動取代width1、width2等值。如欲為每張圖片設定不同的寬度,請不要使用此參數。
- background color:圖片框內範圍的背景顏色。
引用本模板時,請複製以下空白加註釋的模板:
{{multiple image
| align = <!-- left/right/center 圖片框對齊方式 -->
| direction = <!-- horizontal/vertical 圖片的排列方式 -->
| header = <!-- 圖片框標題 -->
| header_align = <!-- left/right/center 圖片框標題的對齊方式 -->
| header_background = <!-- 圖片框標題背景 -->
| footer = <!-- 圖片框框底 -->
| footer_align = <!-- left/right/center 圖片框框底的對齊方式 -->
| footer_background = <!-- 圖片框框底背景 -->
| width = <!-- 所有圖片的寬度 -->
| image1 = <!-- 顯示的圖片名稱 -->
| width1 = <!-- 像素單位的圖片寬度 -->
| alt1 = <!-- 圖片不能顯示時的替代文字 -->
| caption1 = <!-- 圖片說明 -->
| image2 = <!-- 顯示的圖片名稱 -->
| width2 = <!-- 像素單位的圖片寬度-->
| alt2 = <!-- 圖片不能顯示時的替代文字 -->
| caption2 = <!-- 圖片說明 -->
| image3 =
| width3 =
| alt3 =
| caption3 =
| image4 =
| width4 =
| alt4 =
| caption4 =
| image5 =
| width5 =
| alt5 =
| caption5 =
| image6 =
| width6 =
| alt6 =
| caption6 =
| image7 =
| width7 =
| alt7 =
| caption7 =
| image8 =
| width8 =
| alt8 =
| caption8 =
| image9 =
| width9 =
| alt9 =
| caption9 =
| image10 =
| width10 =
| alt10 =
| caption10 =
}}
範例
[编辑]{{multiple image
| footer = 运动员们被黄牌警告、红牌罚下。
| width = 60
| image1 = Yellow card.svg
| alt1 = 黄色的圆角矩形
| image2 = Red card.svg
| alt2 = 红色的圆角矩形
}}
{{multiple image
| align = left
| direction = vertical
| header = [[PNG]]透明度示范
| width = 200
| image1 = PNG transparency demonstration 1.png
| alt1 = 白色背景上的彩色骰子
| caption1 = 包含8位透明通道的PNG图像
| image2 = PNG transparency demonstration 2.png
| alt2 = 方格纹背景上的彩色骰子
| caption2 = 同样的图像覆盖在方格纹背景上
}}
{{multiple image
| footer = 当用户拥有很多同种[[WP:维基星章|星章]]时,可以用[[WP:维基绶带|绶带]]代表它们,并用数字来标示星章数量。
| width = 60
| image1 = Ribbon numeral 2.png
| alt1 = 2
| image2 = Ribbon numeral 3.png
| alt2 = 3
| image3 = Ribbon numeral 4.png
| alt3 = 4
}}
加上背景顏色的範例
[编辑]五福花(Adoxa moschatellina)
{{multiple image
| image1=Adoxa_moschatellina_210406.jpg
| alt1=开有黄白色小花的绿色植物
| image2=Adoxa_moschatellina_210406a.jpg
| alt2=绿叶包围中的3朵黄白色小花
| image3=adoxa_moschatellina_blatt.jpeg
| alt3=植株的叶子。每组3片、每片3裂。
| footer=[[五福花]](''Adoxa moschatellina'')
| footer_background=#BBDD99
| background color=#BBDD99
| footer_align=center
| width=160
}}
繁简转换
[编辑]- 示例:
{{多个图像
| align = center
| direction = horizontal
| image1 = 二里头一号宫殿平面图 zh hans.png
| width1 = 100
| caption1 = 示意图(简体)
}}
{{多个图像
| align = center
| direction = horizontal
| image1 = 二里头一号宫殿平面图 zh hant.png
| width1 = 100
| caption1 = 示意圖(繁體)
}}
重定向
[编辑]{{multiple image}}{{multiple images}}{{Multiple images}}{{Multiple image}}{{多图}}{{圖像橫列}}{{橫列圖像}}{{竪列圖像}}{{圖像竪列}}{{圖像縱列}}{{縱列圖像}}{{圖像並列}}{{並列圖像}}
參見
[编辑]{{Double image}}{{Double image stack}}{{Triple image}}