打开/关闭菜单
10
17
63
441
【VOCAKEY.WIKI】VOCAKEY愿你唱出心中的歌
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:ExternalImage:修订间差异

来自【VOCAKEY.WIKI】VOCAKEY愿你唱出心中的歌
MuratBeysss留言 | 贡献
无编辑摘要
MuratBeysss留言 | 贡献
长宽默认改为auto 即图片默认大小 只有为width和height赋值才会限制图片大小
 
(未显示同一用户的2个中间版本)
第1行: 第1行:
<includeonly><div class="thumb tright">
<includeonly><div class="thumb" style="float: none; display: block; clear: both; margin-bottom: 10px;">
<div class="thumbinner" style="width: {{{width|220}}}px;">
<div class="thumbinner" style="width: {{{width|auto}}}px;">
<div style="width: {{{width|250}}}px; height: {{{height|500}}}px; overflow: auto; line-height: 0;">
<div style="width: 100%; height: {{{height|auto}}}px; overflow: auto; line-height: 0;">
{{{url}}}
{{{url}}}
</div>
<div class="thumbcaption" style="text-align: left;">
<div style="font-weight: bold;">{{{title|}}}</div>
<div>{{{description|}}}</div>
</div>
</div>
</div>
</div>
第18行: 第14行:
"description": "图片链接",
"description": "图片链接",
"type": "url"
"type": "url"
},
"title": {
"description": "图片标题 下方加粗显示",
"type": "content"
},
"description": {
"description": "图片描述 标题下方显示",
"type": "content"
},
},
"width": {
"width": {
"description": "限制宽度",
"description": "限制宽度",
"type": "number"
"type": "number",
"default": "220"
},
},
"height": {
"height": {
"description": "限制高度",
"description": "限制高度",
"type": "number"
"type": "number",
"default": "500"
}
}
},
},
"paramOrder": [
"paramOrder": [
"url",
"url",
"title",
"description",
"width",
"width",
"height"
"height"
],
],
"description": "带标题 描述 限制长宽的右对齐 ExternalImage 模板",
"description": "ExternalImage 模板 方便可视化编辑器添加图片",
"format": "block"
"format": "block"
}
}
</templatedata></noinclude>
</templatedata>
==Example==
文本文本文本
{{ExternalImage
| url = https://upload.wikimedia.org/wikipedia/commons/thumb/f/f2/Hatsune_miku_logo_v3.svg/960px-Hatsune_miku_logo_v3.svg.png
| width = 500
| height = 250
| wrap = yes
}}
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本
文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本
</noinclude>

2025年12月23日 (二) 12:38的最新版本


ExternalImage 模板 方便可视化编辑器添加图片

模板参数[编辑模板数据]

此模板首选参数换行的代码块格式。

参数描述类型状态
urlurl

图片链接

URL必需
widthwidth

限制宽度

默认值
220
数字可选
heightheight

限制高度

默认值
500
数字可选

Example

文本文本文本

960px-Hatsune_miku_logo_v3.svg.png

文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本 文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本文本