Template:Gallery/doc
| 此頁面是Template:Gallery的模板文档。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
| 此模板文档被引用於約5,000個頁面。 為了避免造成大規模的影響,所有對此模板文档的編輯應先於沙盒、測試樣例或您的沙盒上測試。实施修改前,建议先在討論頁發起討論。 模板引用數量會自動更新。 |
| 此模板使用Lua语言: |
| 本模板使用以下模板样式: |
本模板用於建立進階型圖片陣列。如果只是生成普通的圖片陣列,建議使用畫廊。
本模板會將圖片以表格方式由左至右列陣。全域參數|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
}}
-
Statue of Washington outside Federal Hall National Memorial in New York City, overlooking Wall Street
-
Construction of Washington portrait at Mount Rushmore, c. 1932
-
Washington is commemorated on a quarter.
-
Washington on a dollar coin
模板数据
[编辑]模板数据
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
将此模板放置在条目或用户页上,即可在该页面上创建带标题的图库。
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
追蹤分類
[编辑]- Category:使用Gallery不含媒體命名空間前綴的頁面(549)
- Category:使用Gallery含有captionstyle参数的页面(2)
- Category:使用Gallery含有未知参数的页面(5)
- Category:使用Gallery可能存在替代文字不符情況的頁面(5)
參見
[编辑]- Help:Gallery
- {{Cleanup gallery}},以標記非百科圖像的圖片陣列
- {{Image array}}
- {{Multiple image}}
- {{Photomontage}}
- {{Image frame}}
- {{Gallery items}},將圖庫樣式佈局應用於任意內容區段(如模板輸出)
- {{Stack}},圖像等可以在右側堆疊,避免間距和浮動問題