跳转到内容

Template:Gallery/doc

本页使用了标题或全文手工转换
维基百科,自由的百科全书

本模板用於建立進階型圖片陣列。如果只是生成普通的圖片陣列,建議使用畫廊。

本模板會將圖片以表格方式由左至右列陣。全域參數|width=和|height=可控制圖片大小。每列顯示的圖片數量會因圖片寬度及螢幕寬度(包括瀏覽器窗口大小等)而不同。

使用方法

[编辑]
{{Gallery
| title        = 
| align        =
| footer       =
| style        =
| state        =
| height       =
| width        =
| perrow       =
| mode         = 
| whitebg      = 
| noborder     =
| captionstyle =
| File:
 | (圖片説明)
 | class1=
 | alt1=
| File:
 | (圖片説明)
 | class2=
 | alt2=
| File:
 | (圖片説明)
 | class3=
 | alt3=
| File:
 | (圖片説明)
 | class4=
 | alt4=
| File:
 | (圖片説明)
 | class5=
 | alt5=
}}

選填參數

[编辑]

適用於整個圖片陣列的的參數

|title=:圖片陣列的標題
|align=:圖片的對齊方式,預設居左,可選居中或居右;填寫|state=時將會被忽略
|footer=:在圖片陣列的右下角顯示的註腳文字
|style=:為整個圖片陣列指定CSS樣式(參見Help:层叠样式表)
|state=:可摺叠圖片陣列的預設狀態,請填寫|state=expanded或|state=collapsed。可摺叠圖片陣列將會占用頁面的全部寬度
|mode=:内嵌畫廊的模式。常見使用|mode=packed或|mode=nolines(參見畫廊)

適用於圖片陣列中所有圖片的參數

|noborder=:取消圖片的邊框,請使用|noborder=yes
|whitebg=:取消圖片的白色背景,請使用|whitebg=no
|height=:設定圖片顯示的高度,預設是180(px)。不需要填寫「px」字樣
|width=:設定圖片顯示的寬度,預設是180(px)。不需要填寫「px」字樣
|perrow=:每排顯示的圖片數量
|captionstyle=:指定圖片説明的CSS樣式(參見Help:层叠样式表)

范例

[编辑]
{{Gallery
|title=Cultural depictions of George Washington
|width=160 | height=170 |noborder=yes
|align=center
|footer=Example 1
|File:Federal Hall NYC 27.JPG 
 |Statue of Washington outside [[Federal Hall National Memorial]] in [[New York City]], overlooking [[Wall Street]]
 |alt1=Statue facing a city building with Greek columns and huge U.S. flag
|File:Mount Rushmore2.jpg 
 |Construction of Washington portrait at [[Mount Rushmore]], c. 1932
 |alt2=Profile of stone face on mountainside, with 3 workers.
|File:2006 Quarter Proof.png 
 |Washington is commemorated on a [[Quarter (United States coin)|quarter]].
 |class3=bg-transparent
 |alt3=Shiny silver coin with profile of Washington bust. 
|File:George Washington Presidential $1 Coin obverse.png 
 |Washington on a [[dollar coin (United States)|dollar coin]]
 |class4=bg-transparent
 |alt4=Gold coin with bust of Washington facing slightly left
}}

模板数据

[编辑]

追蹤分類

[编辑]

參見

[编辑]