跳转到内容

Template:Double image:修订间差异

维基百科,自由的百科全书
删除的内容 添加的内容
无编辑摘要
撤销小老虎3018讨论)的版本53859308
 
(未显示6个用户的11个中间版本)
第1行: 第1行:
<noinclude>{{Deprecated template|Double image|Multiple image}}
<includeonly>{{#switch: {{{1|}}} <!-- first parameter inserts a <div> with a left, right or central float -->
</noinclude><includeonly>{{multiple image
| left = <div class="thumb tleft">
| align = {{{{{|safesubst:}}}#switch: {{{1|}}}
| right = <div class="thumb tright">
|left|right = {{{1|}}}
| center|centre = <div class="center"><div class="thumb tnone">
|center|centre = center
| #default = <div class="thumb tright">
}}<div class="thumbinner" style="width:{{#expr: {{{3|0}}} + {{{5|0}}} + 8}}px;"> <!-- calculate width based on image widths +8px -->
{| style="background: transparent; border: 0; padding: 0; margin: 0; width:{{#expr: {{{3|0}}} + {{{5|0}}} + 4}}px;" cellspacing="0"
|- style="vertical-align:top;"
| style="padding: 0; margin: 0;" class="thumbimage" | [[File:{{{2}}}|{{{3}}}px|{{{6|}}}]] <!-- image 1 -->
| style="padding: 0; margin: 0; border: 0; width: 2px" |
| style="padding: 0; margin: 0;" class="thumbimage" | [[File:{{{4}}}|{{{5}}}px|{{{6|}}}]] <!-- image 2 -->
|- style="vertical-align:top;"
{{#if: {{{7|}}} | <!-- two captions if the seventh param (caption for title two) is specified -->
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}} <div class="thumbcaption">{{{6|}}}</div>
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}}
{{!}} style="padding: 0; margin: 0; border: 0;" {{!}} <div class="thumbcaption">{{{7|}}}</div>
| <!-- otherwise just have one caption underneath both images -->
{{!}} style="padding: 0; margin: 0; border: 0;" colspan="3" {{!}} <div class="thumbcaption">{{{6|}}}</div>
}}
}}
| direction = horizontal
|}
| image1 = {{{2}}}
</div>
| width1 = {{{3|0}}}
{{#switch: {{{1|}}} <!-- as central image float needs two divs, need to close two for center and only one for left/right -->
| alt1 = {{{8|}}}
| center|centre = </div></div>
| caption1 = {{{{{|safesubst:}}}#if: {{{7|}}} | {{{6|}}} }}
| </div>
| image2 = {{{4}}}
}}</includeonly><noinclude>{{documentation}}</noinclude>
| width2 = {{{5|0}}}
| alt2 = {{{9|}}}
| caption2 = {{{7|}}}
| footer = {{{{{|safesubst:}}}#if: {{{7|}}} || {{{6|}}} }}
| footer_align = left
| valign = {{{valign|middle}}} <!-- style="vertical-align:{{{valign|middle}}};" -->
}}</includeonly><noinclude>{{documentation}}<!-- PLEASE ADD CATEGORIES TO THE /doc SUBPAGE, THANKS --></noinclude>

2021年9月30日 (四) 04:23的最新版本

文档图示 模板文档[查看] [编辑] [历史] [清除缓存]

本模板的用途是在產生一個內含有兩張圖片與圖說的的圖文框,圖文框中的圖片,是以水平方式橫向並排。

{{Double Image}}={{2images}}={{Double image}}={{双图}}

用途

[编辑]

參數的設定方式如下:

{{double image|left/right/center|Left image|Left image size|Right image|Right image size|Left caption|Right caption|Left alt text|Right alt text}}

or

{{double image
|1=left/right/center
|2=Left image
|3=Left image size
|4=Right image
|5=Right image size
|6=Left caption
|7=Right caption (leave blank to combine)
|8=Left image alt text
|9=Right image alt text}}

範例

[编辑]
Yellow cartouche
Red cartouche
球員在被警告時會拿到一張黃卡,而在拿到紅卡時則表示被驅逐出場

To the right, with one single caption:

{{double image|right|Yellow card.svg|60|Red card.svg|60|球員在被警告時會拿到一張黃卡,而在拿到紅卡時則表示被驅逐出場||Yellow cartouche|Red cartouche}}


Yellow cartouche
黃卡
Red cartouche
紅卡

To the left. With two captions, one beneath each image:

{{double image|left|Yellow card.svg|60|Red card.svg|60|黃卡|紅卡|Yellow cartouche|Red cartouche}}

参见

[编辑]