打开/关闭菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

Template:Gallery:修订间差异

模板页面
无编辑摘要
标签已被回退
撤销Wzy讨论)的修订版本9363
标签撤销
 
第27行: 第27行:
ul.gallery.template div.gallerytext{
ul.gallery.template div.gallerytext{
     overflow:hidden;font-size:94%;padding:2px 4px;word-wrap:break-word;text-align:center;
     overflow:hidden;font-size:94%;padding:2px 4px;word-wrap:break-word;text-align:center;
}
}  
ul.gallery.template li.gallerybox div.thumb span a img:focus::after,
ul.gallery.template li.gallerybox div.thumb span a img:hover::after {
    content: url('/resources/assets/logo.png');
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
}
 
ul.gallery.template li.gallerybox div.thumb span a img:focus,
ul.gallery.template li.gallerybox div.thumb span a img:hover {
    position: relative;
}
}}}}}}</includeonly>
}}}}}}</includeonly>
<noinclude>
<noinclude>

2024年8月2日 (五) 16:59的最新版本


标签 <gallery> 的替代品,支持gif动图

使用方法

调用参数

{{gallery|caption=<caption>|width=<width>|height=<height>|perrow=<perrow>
|file1|title1
|file2|title2
…
|fileN|titleN
}}

必填

  • file:图片名

选填

  • caption:gallery的标题
  • width:宽(单位:px)设置宽高时建议按照图片尺寸比例设置
  • height:高(单位:px)设置宽高时建议按照图片尺寸比例设置
  • perrow:每行显示数量
  • title:图片提示文字

示例1

你所写的

{{gallery
|file:Main MPI3508.jpg|文字描述
|file:4.0-HDMI-004.jpg|可以指向[[首页]]
|file:4.0-HDMI-004.jpg|
}}

显示内容


示例2

你所写的

{{gallery|caption=标题|width=200px|height=200px|perrow=2
|file:Main MPI3508.jpg|文字描述
|file:4.0-HDMI-004.jpg|可以指向[[首页]]
|file:4.0-HDMI-004.jpg|
}}

显示内容