跳至內容

模板:Gallery2/doc

本頁使用了標題或全文手工轉換
維基百科,自由的百科全書

概要

[編輯]

本模板與 {{gallery}} 的不同在於,本模板可以提供更多參數來定製藝廊的顯示效果。

使用方法

[編輯]
{{Gallery2
| title        = 
| align        =
| footer       =
| mode         =
| style        =
| state        =
| height       =
| width        =
| captionstyle =
| File:
 | alt1=
 | 輸入標題
| File:
 | alt2=
 | 輸入標題
| File:
 | alt3=
 | 輸入標題
| File:
 | alt4=
 | 輸入標題
| File:
 | alt5=
 | 輸入標題
}}

參數

[編輯]

用於每個圖像

[編輯]
|File:文件名 |altn=圖像的替代文本 |标题

可選參數

[編輯]
|title=——藝廊標題
|align=——對齊方式:left(默認)、center、right,如果設置 |state= 參數會被忽略
|footer=——註腳文字
|style=——CSS樣式(參見幫助:層疊樣式表
|state=——設置摺疊式藝廊的狀態,可以是 |state=expanded 或者 |state=collapsed
|mode=——設置顯示模式,可以是 |mode=packed|mode=nolines

下面參數用於所有圖像

|height=——設定圖片顯示高度的最大值,默認為180 px
|width=——設定圖片顯示寬度的最大值,默認為180 px
|captionstyle=——用於標題的CSS樣式
|noborder=——用於取消圖像周圍的邊框,輸入 yes 即可

範例

[編輯]
{{Gallery2
|title=Cultural depictions of George Washington
|width=160 | height=170
|align=center
|footer=Example 1
|File:Federal Hall NYC 27.JPG 
 |alt1=Statue facing a city building with Greek columns and huge U.S. flag
 |Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]]
|File:Mount Rushmore2.jpg 
 |alt2=Profile of stone face on mountainside, with 3 workers.
 |Construction of Washington portrait at [[Mount Rushmore]], c. 1932
|File:2006 Quarter Proof.png 
 |alt3=Shiny silver coin with profile of Washington bust. 
 |Washington is commemorated on a [[Quarter (United States coin)|quarter]].
|File:George Washington Presidential $1 Coin obverse.png 
 |alt4=Gold coin with bust of Washington facing slightly left
 |Washington on a [[dollar coin (United States)|dollar coin]]
}}
{{Gallery2
|title=Cultural depictions of George Washington
|width=120 |height=100
|align=center
|footer=Example 2a
|File:Federal Hall NYC 27.JPG
 |alt1=Statue facing a city building with Greek columns
 |Statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]]
|File:Mount Rushmore2.jpg
 |alt2=Profile of stone face on mountainside, with 3 workers.
 |Work on Washington portrait at [[Mount Rushmore]], c. 1932
|File:2006 Quarter Proof.png
 |alt3=Shiny silver coin with profile of Washington bust. 
 |Washington on a [[Quarter (United States coin)|quarter]]
|File:United_States_one_dollar_bill,_obverse.jpg
 |alt4=Front side of U.S. dollar bill, with Washington portrait in center.
 |[[United States one-dollar bill|U.S. one-dollar bill]]
|File:George Washington Presidential $1 Coin obverse.png
 |alt5=Gold coin with bust of Washington facing left
 |Washington on a [[dollar coin (United States)|dollar coin]]
}}

參見

[編輯]