打开/关闭搜索
搜索
打开/关闭菜单
43
1,113
4
9,249
LCD wiki
导航
首页
最近更改
帮助
特殊页面
上传文件
站点
English Site
中文站点
notifications
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。
user-interface-preferences
个人工具
登录
查看“Template:Gallery”的源代码
模板页面
更多操作
←
Template:Gallery
因为以下原因,您没有权限编辑该页面:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
<includeonly><ul class="template gallery" {{#if:{{{perrow|}}}|style="max-width:{{#expr:({{#rmatch:{{{width|150px}}}|(\d+)|$1}}+9)*{{{perrow}}}}}px"}}>{{#if:{{{caption|}}}|<li class="gallerycaption">{{{caption}}}</li>}}{{#forargs:|k|v|{{#rmatch:{{#var:k}}|^\d+$|{{#ifeq:{{#expr:{{#var:k}} mod 2}}|1|<li class="gallerybox"><div class="thumb">[[{{#var:v}}]]</div><div class="gallerytext"><p>|{{#var:v}}</p></div></li>}}}}}}</ul>{{#if:{{#varexists:gallery}}||{{#vardefineecho:gallery|{{#css:ul.gallery.template{margin:2px;padding:2px;}ul.gallery.template li.gallerycaption{font-weight:bold;text-align:center;word-wrap:break-word}ul.gallery.template li.gallerybox{vertical-align:top;display:inline-flex;flex-direction:column;}ul.gallery.template li.gallerybox div.thumb{width:{{{width|150px}}};height:{{{height|150px}}};max-width:{{{width|150px}}};max-height:{{{height|150px}}};padding:15px;border:1px solid #c8ccd1;background-color:#f8f9fa;display:flex;justify-content:center;align-items:center;margin:4px;}ul.gallery.template li.gallerybox div.thumb img{max-width:{{#expr:({{#rmatch:{{{width|150px}}}|(\d+)|$1}}-30)}}px;max-height:{{#expr:({{#rmatch:{{{width|150px}}}|(\d+)|$1}}-30)}}px;object-fit:contain;margin:0 auto;}ul.gallery.template div.gallerytext{overflow:hidden;font-size:94%;padding:2px 4px;word-wrap:break-word;text-align:center;} }} }}}}</includeonly><noinclude> <!-- 简述模板作用 --> 标签 <nowiki><gallery></nowiki> 的替代品,支持gif动图 ==使用方法== <!-- 简述使用方法 --> ===调用参数=== <!-- 填写模板用法 --> <pre>{{gallery|caption=<caption>|width=<width>|height=<height>|perrow=<perrow> |file1|title1 |file2|title2 … |fileN|titleN }}</pre> ===必填=== <!-- 必填参数项的说明,如没有可以留空或删除 --> *file:图片名 ===选填=== <!-- 选填参数项的说明,如没有可以留空或删除 --> *caption:gallery的标题 *width:宽(单位:px) *height:高(单位:px) *perrow:每行显示数量 *title:图片提示文字 ==示例1== <!-- 模板使用示例 --> ===你所写的=== <pre>{{gallery |file:Main MPI3508.jpg|文字描述 |file:4.0-HDMI-004.jpg|可以指向[[首页]] |file:4.0-HDMI-004.jpg| }}</pre> ===显示内容=== {{gallery |file:Main MPI3508.jpg|文字描述 |file:4.0-HDMI-004.jpg|可以指向[[首页]] |file:4.0-HDMI-004.jpg| }} ==示例2== <!-- 模板使用示例 --> ===你所写的=== <pre>{{gallery|caption=标题|width=200px|height=100px|perrow=2 |file:Main MPI3508.jpg|文字描述 |file:4.0-HDMI-004.jpg|可以指向[[首页]] |file:4.0-HDMI-004.jpg| }}</pre> ===显示内容=== {{gallery|caption=标题|width=200px|height=100px|perrow=2 |file:Main MPI3508.jpg|文字描述 |file:4.0-HDMI-004.jpg|可以指向[[首页]] |file:4.0-HDMI-004.jpg| }} </noinclude>
该页面使用的模板:
Template:Gallery
(
查看源代码
)
返回
Template:Gallery
。