编辑“Template:Info”
跳到导航
跳到搜索
该编辑可以被撤销。 请检查下面的对比以核实您想要撤销的内容,然后发布下面的更改以完成撤销。
最后版本 | 您的文本 | ||
第1行: | 第1行: | ||
<div class="nomobile infoBox | <noinclude>这是效果预览 | ||
{{#if:{{{title|}}}|<div class="infoBoxTitle" style="{{{title-style|}}}">{{{title}}}</div>}}<div class="infoBoxIcon" style="{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}{{{icon-style|}}}">{{{leftimage|[[ | </noinclude> | ||
<div class="nomobile infoBox infobox1" style="width:{{{width|80%}}};{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class|infoBoxContent}}}" 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: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> | </div></div> | ||
<div class="mobileonly" style="width:100%;{{#if:{{{backgroundColor|}}}|background-color:{{{backgroundColor}}};}}"><div class="{{{class| | <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}}};"}}> | ||
{{#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>}} | {{#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> | </div></div> | ||
{{#switch:{{{type|}}} | |||
| top = [[分类:页顶提示模板]] | |||
| middle = [[分类:页中提示模板]] | |||
| none = | |||
| #default = }}<noinclude> | |||
== 结构 == | |||
<pre> | |||
{{Info | |||
|class= | |||
|width= 默认值是80% | |||
|color= 默认值是#1e90ff | |||
|title-style= | |||
|title= | |||
|icon-style= | |||
|leftimage= 默认值是[[image:Icon-info.png|50px|link=]] | |||
|text-style= | |||
|text= 默认值是'''警告!你还没有添加任何内容''' | |||
|below-style= | |||
|below= | |||
}} | |||
</pre> | |||
<pre> | |||
{{Info | |||
{ | |class= | ||
|width= | |||
|color= | |||
|title-style= | |||
|title= | |||
|icon-style= | |||
|leftimage= | |||
|text-style= | |||
|text= | |||
|below-style= | |||
|below= | |||
}} | |||
</pre> | |||
所有参数都可以留空或者删去,但是会使模板失去作用,不写任何东西的效果见上面的【效果预览】。 | |||
除了|text= 以外的所有参数留空或者删去是合理的用法。 | |||
|text=可以用参数【1】代替 | |||
{{Color|Green|可以使用参数title来增加一个标题<br />可以使用参数below来增加一个页脚}} | |||
== 举例说明 == | |||
<pre> | |||
{{info | |||
|width=50% | |||
|title=欢迎来到H萌娘! | |||
|text= 欢迎使用info模板框,这个模板是所有模板的父模板 | |||
|class= infoBoxGreen | |||
|text-style= color: Green; font-weight: bold; font-style: italic; | |||
|leftimage= [[image:Icon-info.png|50px|link=]] | |||
|color= Green | |||
|below=H萌娘,万物皆可H! | |||
|class= | |||
}} | |||
</pre> | |||
{{info | |||
|width=50% | |||
|title=欢迎来到H萌娘! | |||
|text= 欢迎使用info模板框,这个模板是所有模板 的 父模板 | |||
|class= infoBoxGreen | |||
|text-style= color: Green; font-weight: bold; font-style: italic; | |||
|leftimage= [[image:Icon-info.png|50px|link=]] | |||
|color= Green | |||
|below=H萌娘,万物皆可H! | |||
|class= | |||
}} | |||
[[分类:提示模板 ]]</noinclude> | |||