Template:Info:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>Zyksnowy
无编辑摘要
imported>Zyksnowy
无编辑摘要
第1行: 第1行:
<noinclude>这是效果预览
<noinclude>这是效果预览
<div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="border-color:{{{backgroundColor}}};background-color:{{{backgroundColor}}};"}}>
</noinclude><div class="infoBox {{{class|}}}" style="width:{{{width|80%}}};border-left: 10px solid {{{color|#1e90ff}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="infoBoxContent" {{#if:{{{backgroundColor|}}}|style="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:Icon-info.png|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:Icon-info.png|50px|link=]]}}}</div><div class="infoBoxText" style="{{{text-style|}}}">{{{text|{{{1|'''警告!你还没有添加任何内容'''}}}}}}</div>{{#if:{{{below|}}}|<div class="infoBoxBelow" style="{{{below-style|}}}">{{{below}}}</div>}}
</div></div>{{#switch:{{{type|}}}
</div></div>{{#switch:{{{type|}}}
第6行: 第6行:
| middle = [[Category:页中提示模板]]
| middle = [[Category:页中提示模板]]
| none = 
| none = 
| #default = [[Category:页顶提示模板]] }}<noinclude>
| #default = }}<noinclude>


== 結構 ==
== 結構 ==

2017年2月14日 (二) 00:41的版本

这是效果预览

Icon-info.png
警告!你还没有添加任何内容

結構

{{Info
|class=
|width= 默認值是80%
|color= 默認值是#1e90ff
|backgroundColor=
|title-style=
|title=
|icon-style=
|leftimage= 默認值是[[image:Icon-info.png|50px|link=]]
|text-style=
|text= 默認值是'''警告!你还没有添加任何内容'''
|below-style=
|below=
}}
{{Info
|class=
|width=
|color=
|backgroundColor=
|title-style=
|title=
|icon-style=
|leftimage=
|text-style=
|text=
|below-style=
|below=
}}
所有參數都可以留空或者删去,但是會使模板失去作用,不写任何东西的效果见上面的【效果预览】。
除了|text= 以外的所有參數留空或者删去是合理的用法。
|text=可以用参数【1】代替
可以使用参数title来增加一个标题
可以使用参数below来增加一个页脚

举例说明

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