Template:并列图像

维基百科,自由的百科全书
跳转至: 导航搜索
Documentation icon 模板文档[查看] [编辑] [历史] [刷新]

本模板用於將二至六張圖片並列(橫向或縱向)顯示在一個框內。您可替所有圖片輸入一個說明,或為每張圖片輸入獨立說明。

{{并列图像}}={{Multiple images}}={{Multiple image}}={{圖像橫列}}={{橫列圖像}}={{竪列圖像}}={{圖像竪列}}={{圖像縱列}}={{縱列圖像}}={{圖像並列}}={{多图}}

如果图片分繁简显示,请参考#繁简转换章节。

用法[编辑]

參數解說
  • align:圖片框的對齊方式(left/right/center),預設值為「置中對齊」(center)
  • direction:圖片的排列方式(horizontal/vertical),預設值為「橫向」(horizontal)
  • header_align:圖片框標題的對齊方式(left/right/center),預設值為「置中對齊」(center)
  • footer_align:圖片框框底的對齊方式(left/right/center),預設值為「靠左對齊」(left)
  • image1image2等:顯示的圖片名稱(不需輸入File:或Image:)
  • width1width2等:圖片寬度,以像素為單位(不需輸入px)
  • alt1alt2等:圖片不能顯示時的替代文字
  • caption1caption2等:圖片的獨立說明
  • width:所有圖片的寬度,使用後將自動取代width1width2等值。如欲為每張圖片設定不同的寬度,請不要使用此參數。
  • background color:圖片框內範圍的背景顏色。
  • header(標題)、footer(框底)、background color及各圖片的caption均是選填參數。

引用本模板時,請複製以下空白模板:

{{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 = 
}}

範例[编辑]

Yellow cartouche
Red cartouche
Players are cautioned with a yellow card and sent off with a red card.
{{multiple image
 | footer    = Players are cautioned with a yellow card and sent off with a red card.
 | width     = 60
 | image1    = Yellow card.svg
 | alt1      = Yellow cartouche
 | image2    = Red card.svg
 | alt2      = Red cartouche
}}


PNG transparency demonstration

Colored dice with white background
A PNG image with an 8-bit transparency layer...
Colored dice with checkered background
...here overlaid onto a checkered background.
{{multiple image
 | align     = left
 | direction = vertical
 | header    = [[PNG]] transparency demonstration
 | width     = 200
 | image1    = PNG transparency demonstration 1.png
 | alt1      = Colored dice with white background
 | caption1  = A PNG image with an 8-bit transparency layer...
 | image2    = PNG transparency demonstration 2.png
 | alt2      = Colored dice with checkered background
 | caption2  = ...here overlaid onto a checkered background.
}}


2
3
4
When a user has many of one type of barnstar,

they can represent them with ribbons and these numerals to indicate the count.

{{multiple image
 | footer   = When a user has many of one type of [[WP:BARN|barnstar]],
they can represent them with [[WP:RIBBON|ribbons]]
and these numerals to indicate the count.
 | width    = 60
 | image1   = Ribbon numeral 2.png
 | alt1     = 2
 | image2   = Ribbon numeral 3.png
 | alt2     = 3
 | image3   = Ribbon numeral 4.png
 | alt3     = 4
}}


加上背景顏色的範例[编辑]

̂
Green herb with a few tiny yellow-white flowers
Three small white and yellow flowers before green-leaf background
Leaves of a plant. They are in groups of three, each with three lobes.
Adoxa (Adoxa moschatellina)


̂{{multiple image
 | image1=Adoxa_moschatellina_210406.jpg
 | alt1=Green herb with a few tiny yellow-white flowers
 | image2=Adoxa_moschatellina_210406a.jpg
 | alt2=Three small white and yellow flowers before green-leaf background
 | image3=adoxa_moschatellina_blatt.jpeg
 | alt3=Leaves of a plant. They are in groups of three, each with three lobes.
 | footer=[[Adoxa]] (''Adoxa moschatellina'')
 | footer_background=#BBDD99
 | background color=#BBDD99
 | footer_align=center
 | width=160
}}

繁简转换[编辑]

示例:
-{zh-hant:{{并列图像
| align  = center
| direction = horizontal
| image1    = 二里头一号宫殿平面图 zh hant.png
| width1    = 100
| caption1  = 示意圖(繁體)
}};zh-hans:{{并列图像
| align  = center
| direction = horizontal
| image1    = 二里头一号宫殿平面图 zh hans.png
| width1    = 100
| caption1  = 示意图(简体)}}}-

參見[编辑]