跳至內容

模板:Gallery/doc

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

本模板將多張圖片組成圖片陣列。圖片將會以表格方式由左至右排列。

選填參數

[編輯]
  • title 圖片陣列的標題
  • width 設定圖片顯示的寬度,預設是180(px)。
  • height 設定圖片顯示的高度,預設是180(px)。
  • lines 圖片說明的顯示行數上限,預設是2。超過上限的說明內文會自動出現捲動按鈕。
  • footer 在圖片陣列的右下角顯示的註腳文字

使用方法

[編輯]
{{Gallery
 | title  = 图片阵列标题
 | footer = 注脚文字
 | width  = 150
 | height = 170
 | lines  = 2
 | File:Pigion052006.JPG|图片的说明
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|图说部分也可支援[[Wikipedia:如何编辑页面|内部链接]]
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|
 | File:Pigion052006.JPG|当说明内文超过指定的行数上限后,会自动出现滚动条。
 | File:Pigion052006.JPG|
}}

範例

[編輯]
{{Gallery
|title=Cultural depictions of George Washington
|width=160
|height=170
|lines=4
|align=center
|File:Federal Hall NYC 27.JPG|alt1=Back of statue facing a city building whose facade is Greek columns covered by a huge U.S. flag|The statue of Washington outside [[Federal Hall]] in [[New York City]], looking on [[Wall Street]].
|File:Mount Rushmore2.jpg|alt2=Profile of stone face jutting out from a mountainside. Three workers clamber over it, each about the height of the face's upper lip.|Construction on the George Washington portrait at [[Mount Rushmore]], c. 1932.
|File:2006 Quarter Proof.png|alt3=Shiny silver coin with profile of Washington bust. He faces left regally and wears a colonial-style queue in his hair. "UNITED STATES OF AMERICA" is at top, "QUARTER DOLLAR" at bottom, "LIBERTY" at left, and "IN GOD WE TRUST" above "S" at right. Just below the bust is "JF uc" in tiny letters.|Washington is commemorated on the [[Quarter (United States coin)|quarter]].
|File:George Washington Presidential $1 Coin obverse.png|alt4=Gold coin with bust of Washington facing slightly left of but looking sternly straight at the viewer. "GEORGE WASHINGTON" is above, "1st PRESIDENT 1789–1797" below, and "JFM" in tiny letters at the bust's base.|Washington is also commemorated on some [[dollar coin (United States)|dollar coins]].
}}

模板數據

[編輯]
模板數據
以下是該模板的模板資料,適用於視覺化編輯器等工具。

Gallery模板資料

將此模板放置在條目或用戶頁上,即可在該頁面上創建帶標題的圖片陣列。

模板參數

此模板以參數區塊格式為優先。

參數描述類型狀態
標題title

整個圖片陣列的標題

字串建議
對齊方式align

圖片陣列在頁面上的對齊方式;可選值包括:left、right、center

建議值
left center right
預設
left
範例
center
字串非必填
腳註footer

創建一個頁腳,以小字體顯示在整個圖片陣列的右下角

字串非必填
CSS樣式style

Allows custom Cascading Style Sheets styling to be added to the gallery block.

範例
border: 1px solid black;
字串非必填
標題樣式captionstyle

This parameter allows an editor to utilize Cascading Style Sheet code for caption

不明非必填
狀態state

This parameter allows the editor to determine whether or not the gallery will initially appear as either expanded or collapsed for readers

建議值
expanded collapsed
預設
expanded
範例
collapsed
字串非必填
高度height

determines the maximum height for any image within the gallery

預設
180
範例
100
數值非必填
寬度width

Analogous to height parameter; sets maximum width for any image in the gallery

預設
180
範例
120
數值非必填
模式mode

Sets the mode used by the inner gallery tag, see [[Help:Gallery tag]] for more options

建議值
traditional nolines packed packed-overlay packed-hover slideshow
預設
traditional
字串非必填
禁用邊框noborder

Cancel the border surrounding the images

預設
no
範例
yes
字串非必填
禁用白色背景whitebg

Used to disable the white background in the inner gallery tag

預設
yes
範例
no
布林值非必填

參見

[編輯]