Template:Double image:修订间差异
外观
删除的内容 添加的内容
小无编辑摘要 |
|||
(未显示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"> |
|||
⚫ | |||
| #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|}}} |
|||
⚫ | |||
| caption1 = {{{{{|safesubst:}}}#if: {{{7|}}} | {{{6|}}} }} |
|||
| </div> |
|||
| image2 = {{{4}}} |
|||
⚫ | |||
| width2 = {{{5|0}}} |
|||
| alt2 = {{{9|}}} |
|||
| caption2 = {{{7|}}} |
|||
| footer = {{{{{|safesubst:}}}#if: {{{7|}}} || {{{6|}}} }} |
|||
| footer_align = left |
|||
| valign = {{{valign|middle}}} <!-- style="vertical-align:{{{valign|middle}}};" --> |
|||
⚫ |
2021年9月30日 (四) 04:23的最新版本
Template:Double image已停用。请使用Template:Multiple image代替。 |
本模板的用途是在產生一個內含有兩張圖片與圖說的的圖文框,圖文框中的圖片,是以水平方式橫向並排。
{{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}}
範例
[编辑]To the right, with one single caption:
{{double image|right|Yellow card.svg|60|Red card.svg|60|球員在被警告時會拿到一張黃卡,而在拿到紅卡時則表示被驅逐出場||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}}
参见
[编辑]- {{Multiple image}}
上述文档嵌入自Template:Double image/doc。 (编辑 | 历史) 编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模板的子页面。 |