模板:Gallery/doc
| File:Edit-copy green.svg | 此頁面是Template:Gallery的模板文件。 此頁面可能包含了模板的使用說明、分類和其他內容。 |
| 警告 | 此模板文件被引用於約4,900個頁面。 為了避免造成大規模的影響,所有對此模板文件的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此模板文件中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
| File:Lua-Logo.svg | 此模板使用Lua語言: |
| CSS | 本模板使用以下模板樣式: |
本模板將多張圖片組成圖片陣列。圖片將會以表格方式由左至右排列。
選填參數[編輯]
- 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]].
}}
-
Construction on the George Washington portrait at Mount Rushmore, c. 1932.
-
Washington is commemorated on the quarter.
-
Washington is also commemorated on some dollar coins.
模板數據[編輯]
模板數據
|
|---|
|
<templatedata> { "params": { "title": { "label": "標題", "description": "整個圖片陣列的標題", "type": "string", "suggested": true }, "align": { "label": "對齊方式", "description": "圖片陣列在頁面上的對齊方式;可選值包括:left、right、center", "example": "center", "type": "string", "default": "left", "suggestedvalues": [ "left", "center", "right" ] }, "footer": { "label": "腳註", "description": "創建一個頁腳,以小字體顯示在整個圖片陣列的右下角", "type": "string" }, "style": { "label": "CSS樣式", "description": "Allows custom Cascading Style Sheets styling to be added to the gallery block.", "example": "border: 1px solid black;", "type": "string" }, "captionstyle": { "label": "標題樣式", "description": "This parameter allows an editor to utilize Cascading Style Sheet code for caption" }, "state": { "label": "狀態", "description": "This parameter allows the editor to determine whether or not the gallery will initially appear as either expanded or collapsed for readers", "example": "collapsed", "type": "string", "default": "expanded", "suggestedvalues": [ "expanded", "collapsed" ] }, "height": { "label": "高度", "description": "determines the maximum height for any image within the gallery", "example": "100", "type": "number", "default": "180" }, "width": { "label": "寬度", "description": "Analogous to height parameter; sets maximum width for any image in the gallery", "example": "120", "type": "number", "default": "180" }, "mode": { "label": "模式", "description": "Sets the mode used by the inner gallery tag, see Help:Gallery tag for more options", "type": "string", "default": "traditional", "suggestedvalues": [ "traditional", "nolines", "packed", "packed-overlay", "packed-hover", "slideshow" ] }, "noborder": { "label": "禁用邊框", "description": "Cancel the border surrounding the images", "example": "yes", "type": "string", "default": "no" }, "whitebg": { "description": "Used to disable the white background in the inner gallery tag", "example": "no", "type": "boolean", "default": "yes", "label": "禁用白色背景" } }, "description": "將此模板放置在條目或用戶頁上,即可在該頁面上創建帶標題的圖片陣列。", "format": "block" } </templatedata> |
追蹤分類[編輯]
- Category:使用Gallery不含媒體命名空間前綴的頁面(0)
- Category:使用Gallery含有captionstyle參數的頁面(0)
- Category:使用Gallery含有未知參數的頁面(0)
- Category:使用Gallery可能存在替代文字不符情況的頁面(0)
參見[編輯]
- Help:Gallery
- {{Cleanup gallery}},以標記非百科圖像的圖片陣列
- {{Image array}}
- {{Multiple image}}
- {{Photomontage}}
- {{Image frame}}
- {{Gallery items}},將圖庫樣式佈局應用於任意內容區段(如模板輸出)
- {{Stack}},圖像等可以在右側堆疊,避免間距和浮動問題