跳转到内容

模板: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
布尔可选

参见

[编辑]