LLWiki正在建設中,歡迎加入我們

「Template:Image」修訂間的差異

出自LLWiki
跳至導覽 跳至搜尋
(撤销Bhsd讨论)的版本12274)
標籤復原 行動版網頁編輯 行動版編輯
第1行: 第1行:
<noinclude>{{doc}}[[category:图片模板]]</noinclude><includeonly><!--</includeonly><syntaxhighlight lang="html+handlebars">
<noinclude>{{doc}}[[category:图片模板]]</noinclude><includeonly><!--</includeonly><syntaxhighlight lang="html+handlebars">
--><div class="template-image" {{#if:{{{title|}}}|title="{{{title}}}"|}} style="width:{{{crop-width|}}};height:{{{crop-height|}}};border:{{{border|}}};border-radius:{{{border-radius|}}};{{{outer-css|}}}"><div style="width:{{{width|}}};margin-left:-{{{x|}}};margin-top:-{{{y|}}};{{{inner-css|}}}">[[File:{{{file|{{{1|}}}}}}{{!}}{{{width|}}}{{#if:{{{height|}}}|x{{{height|}}}|}}{{#if:link|{{!}}link={{{link|}}}|}}]]</div></div><!--
--><div class="template-image" {{#if:{{{title|}}}|title="{{{title}}}"|}} style="width:{{{crop-width|}}};height:{{{crop-height|}}};border:{{{border|}}};border-radius:{{{border-radius|}}};{{{outer-css|}}}"><div style="width:{{{width|}}};margin-left:-{{{x|}}};margin-top:-{{{y|}}};{{{inner-css|}}}">[[File:{{{file|{{{1|}}}}}}|{{{width|}}}{{#if:{{{height|}}}|x{{{height|}}}|}}{{#if:link|{{!}}link={{{link|}}}|}}]]</div></div><!--
</syntaxhighlight><includeonly>--></includeonly>
</syntaxhighlight><includeonly>--></includeonly>

於 2020年10月11日 (日) 11:23 的修訂

Template-info.png 模板文檔
這個文檔嵌入Template:Image/doc

本模板用於給圖片添加移動版可以繼承的樣式,同時也可用於圖片裁剪。

參數列表

參數名 說明
file或匿名參數 必需,圖片文件名
width 圖片寬度,用法同[[File:圖片文件名|<width>]]
height 圖片高度,用法同[[File:圖片文件名|x<height>]]
link 圖片連結,用法同[[File:圖片文件名|link=<link>]]。注意圖片連結對頁面名稱的繁簡敏感。
crop-width 可選,圖片裁剪寬度
crop-height 可選,圖片裁剪高度
x 可選,圖片水平位移(絕對或相對大小),向左為正
y 可選,圖片垂直位移(絕對或相對大小),向上為正
border 可選,圖片邊框樣式
border-radius 可選,圖片邊框圓角樣式,可用於進一步裁剪圖片
outer-css 更多外框樣式
inner-css 更多內框樣式

示例

{{image|bg1.png|height=270px|link=LoveLive!學園偶像祭ALL STARS|crop-width=250px|x=120px|y=40px|border=3px solid {{ll/color}}|border-radius=50px}}
Bg1.png

外部連結

本頁面含有來自萌娘百科的文本,以CC BY-NC-SA 3.0授權引入。經過雙方的修改,內容可能已與來源有很大差異。

<syntaxhighlight lang="html+handlebars"> -->

[[File:||link=]]

</includeonly>