舰R百科是靠无数自愿编辑者持续地建设更新完善的。编辑非常简单,请勇于更新页面!
编辑入门 | 资助百科 | 留言讨论页 | 微博@舰R百科 | 百科编辑讨论Q群:366818861

模板:外链图片:修订间差异

来自舰R百科
跳转到导航 跳转到搜索
(添加说明)
(撤销代代勇讨论)的版本10690)
第1行: 第1行:
{{#switch: {{{位置|}}}
{{#switch: {{{位置|}}}
|右=<img src="{{{地址}}}" width="{{{宽度}}}px" style="float:right;"/><br>{{{说明}}}
|右=<img src="{{{地址}}}" width="{{{宽度}}}px" style="float:right;"/>
|中=<div style="padding:0px 0px; border: thin solid #FFFFFF; margin:0 auto;"><table style="height:100%; width:100%; text-align:center;"><tr><td><img src="{{{地址}}}" width="{{{宽度}}}px"/></td></tr></table></div>
|中=<div style="padding:0px 0px; border: thin solid #FFFFFF; margin:0 auto;"><table style="height:100%; width:100%; text-align:center;"><tr><td><img src="{{{地址}}}" width="{{{宽度}}}px"/></td></tr></table></div>
|左=<img src="{{{地址}}}" width="{{{宽度}}}px" style="float:left"/>
|左=<img src="{{{地址}}}" width="{{{宽度}}}px" style="float:left"/>

2016年6月9日 (四) 12:06的版本

本模板用来放置外链图片

使用方法[编辑源代码]

{{外链图片|地址=|宽度=|位置=}}

  • 【地址】填入图片地址
  • 【宽度】填入需要显示图片的宽度(像素)
  • 【位置】填入图片的对齐方式或是精确位置——“右”为靠右,“中”为居中,填入数字0~100为从左至右浮动(负数或超过100会使图片超出界面),位置留空默认使图片根据文字的位置排版(见最下方的范例),填入“左”会使图片强制靠左(忽视文字排版)。

范例[编辑源代码]

宽度50,位置右
{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=50|位置=右}}

宽度50,位置80
{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=50|位置=80}}

宽度200,位置50
{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=200|位置=50}}

宽度200,位置中
{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=200|位置=中}}
宽度100,位置左(图片强制靠左)
左侧文字{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=100|位置=左}}右侧文字

左侧文字 右侧文字




宽度100,位置留空(图片跟随文字排版)
左侧文字{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=100|位置=}}中间文字{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=100|位置=}}右侧文字

左侧文字 中间文字 右侧文字

两端并列
{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=50|位置=左}}{{外链图片|地址=http://tb2.bdstatic.com/tb/editor/images/face/i_f25.png|宽度=50|位置=右}}