「Template:Info」:修訂間差異

出自H萌娘
跳至導覽 跳至搜尋
imported>=海豚=
無編輯摘要
imported>=海豚=
無編輯摘要
行 1: 行 1:
<div class="nomobile infoBox infobox1" style="width:{{{width|80%}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent new}}}" style="border-left: 9.7px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
<div class="nomobile infoBox infobox1" style="width:{{{width|}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent new}}}" style="border-left: 9.7px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Information_icon4.svg|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[image:Information_icon4.svg|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div>
</div></div>
<div class="mobileonly" style="width:100%;{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxBlue}}}" style="border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
<noinclude>{{doc}}</noinclude>
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}"></div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div><noinclude>{{doc}}</noinclude>

於 2021年6月18日 (五) 08:41 的修訂

Information icon4.svg
警告!你還沒有添加任何內容
Template-info.svg 模板文檔  [查看] [編輯] [歷史] [刷新]

結構

{{Info
|class=
|width= 默认值是80%
|color= 默认值是#1e90ff
|title-style=
|title=
|icon-style=
|leftimage= 默认值是[[File:Icon-info.png|50px|link=]]
|text-style=
|text= 默认值是'''警告!你还没有添加任何内容'''
|below-style=
|below=
}}
{{Info
|class=
|width=
|color=
|title-style=
|title=
|icon-style=
|leftimage=
|text-style=
|text=
|below-style=
|below=
}}

 所有參數都可以留空或者刪去,但是會使模板失去作用,不寫任何東西的效果見上面的【效果預覽】。  除了|text= 以外的所有參數留空或者刪去是合理的用法。  |text=可以用參數【1】代替  可以使用參數title來增加一個標題
可以使用參數below來增加一個頁腳

舉例說明

{{info
|width=50% 
|title=欢迎来到H萌娘!
|text= 欢迎使用info模板框,这个模板是所有模板的父模板
|class= infoBoxRed
|text-style= color: red; font-weight: bold; font-style: italic;
|leftimage= [[image:Icon-info.png|50px|link=]]
|color= red
|below=H萌娘,万物皆可H!
|class=
}}