萌娘百科,万物皆可萌的百科全书!转载请标注来源页面的网页链接,并声明引自萌娘百科。内容不可商用。
跳转到导航
跳转到搜索
此模板含有一些较为复杂的wikitext语法设计。请确认您熟悉wiki语法,了解本模板之构造及用途,并于
沙盒测试后修改。否则,请勿随意更改此模板。
本模板已应用于31000+页面。为避免大规模的破坏及不必要的服务器负荷,任何改动均应先在该模板对应的
沙盒页面或您自己的用户页下进行测试,并将测试无误的代码一次性地改动至本模板。
为尊重其他用户,任何功能/兼容性改动在生效前都应先在
讨论页进行讨论。
该模板由Nostalgia设计,原来是打算引入维基百科的同名模板,因为参数太复杂,所以重新写一个。
模板的创作意念是兼容萌娘百科的所有信息模板,方便其他人创作信息模板。
基于该模板设计的有Infobox系列。
模板涉及一些十分复杂的参数,限制只限管理员编辑,如有更好的思路和欲添加一些新项目,建议在萌娘百科_Talk:讨论版/提问求助或本模板的讨论页面寻求帮助。
用法
:点击查看所有项目
{{Infobox
|class =
|align =
|text-align =
|width =
|max-width =
|float =
|bg-color =
|title-main =
|title-color =
|text-color =
|left-column-color =
|text-color =
|Title =
|image =
|size =
|caption =
|tabs =
|Row titlestyle =
|Row infostyle =
|colspan-site =
|Row x1 =
|Row x2 =
|Row 1 title =
|Row 1 info =
|Row 2 title =
|Row 2 info =
|Row 3 title =
|Row 3 info =
|Row 4 title =
|Row 4 info =
|Row 5 title =
|Row 5 info =
|Row 6 title =
|Row 6 info =
|Row 7 title =
|Row 7 info =
|Row 8 title =
|Row 8 info =
|Row 9 title =
|Row 9 info =
|Row 10 title =
|Row 10 info =
|Row 11 title =
|Row 11 info =
|Row 12 title =
|Row 12 info =
|Row 13 title =
|Row 13 info =
|Row 14 title =
|Row 14 info =
|Row 15 title =
|Row 15 info =
|Row 16 title =
|Row 16 info =
|Row 17 title =
|Row 17 info =
|Row 18 title =
|Row 18 info =
|Row 19 title =
|Row 19 info =
|Row 20 title =
|Row 20 info =
|Row 21 title =
|Row 21 info =
|Row 22 title =
|Row 22 info =
|Row 23 title =
|Row 23 info =
|Row 24 title =
|Row 24 info =
|Row 25 title =
|Row 25 info =
|Row 26 title =
|Row 26 info =
|Row 27 title =
|Row 27 info =
|Row 28 title =
|Row 28 info =
|Row 29 title =
|Row 29 info =
|Row 30 title =
|Row 30 info =
|Row h1 title =
|Row h1 info =
|Row h2 title =
|Row h2 info =
|Row b1 =
|Row b2 =
|Row x1 style =
|Row x2 style =
|Row 1 titlestyle =
|Row 1 infostyle =
|Row 2 titlestyle =
|Row 2 infostyle =
|Row 3 titlestyle =
|Row 3 infostyle =
|Row 4 titlestyle =
|Row 4 infostyle =
|Row 5 titlestyle =
|Row 5 infostyle =
|Row 6 titlestyle =
|Row 6 infostyle =
|Row 7 titlestyle =
|Row 7 infostyle =
|Row 8 titlestyle =
|Row 8 infostyle =
|Row 9 titlestyle =
|Row 9 infostyle =
|Row 10 titlestyle =
|Row 10 infostyle =
|Row 11 titlestyle =
|Row 11 infostyle =
|Row 12 titlestyle =
|Row 12 infostyle =
|Row 13 titlestyle =
|Row 13 infostyle =
|Row 14 titlestyle =
|Row 14 infostyle =
|Row 15 titlestyle =
|Row 15 infostyle =
|Row 16 titlestyle =
|Row 16 infostyle =
|Row 17 titlestyle =
|Row 17 infostyle =
|Row 18 titlestyle =
|Row 18 infostyle =
|Row 19 titlestyle =
|Row 19 infostyle =
|Row 20 titlestyle =
|Row 20 infostyle =
|Row 21 titlestyle =
|Row 21 infostyle =
|Row 22 titlestyle =
|Row 22 infostyle =
|Row 23 titlestyle =
|Row 23 infostyle =
|Row 24 titlestyle =
|Row 24 infostyle =
|Row 25 titlestyle =
|Row 25 infostyle =
|Row 26 titlestyle =
|Row 26 infostyle =
|Row 27 titlestyle =
|Row 27 infostyle =
|Row 28 titlestyle =
|Row 28 infostyle =
|Row 29 titlestyle =
|Row 29 infostyle =
|Row 30 titlestyle =
|Row 30 infostyle =
|Row h1 titlestyle =
|Row h1 infostyle =
|Row h2 titlestyle =
|Row h2 infostyle =
}}
参数
- 整体样式
- class= ,模板使用的class,默认为infobox。
- align= ,模板整体的对齐方式,center为居中,right有为右对齐,left为左对齐。
- text-align= ,模板中文本的水平对齐方式,center为居中,right有为右对齐,left为左对齐。
- width= ,模板宽度,默认260px。
- max-width= ,最大宽度,默认100%。
- float= ,模板的浮动处理,right有为右浮动,left为左浮动,none为不浮动。
- bg-color= ,模板背景色,默认#FFF(白色)。
- colspan-site= ,决定题头、图片、tabs、栏x1、h1等colspan数值,默认为2
- 题头样式
- title-main= ,模板题头,缺省时隐去,保留题头时,请不要使用该项目。
- title-color= ,题头颜色,默认#26ca9b。
- text-color= ,题头文字颜色,默认白色。
- Title= ,题头中的文字。
- 图片部分[1]
- image= ,图片输入,文件名。请勿带有“File:”,除非文件名本身带有。
- size= ,图片大小,默认280px。填写的时候需要“px”/“em”等单位。
- caption= ,图片下方信息。
- image-lostmessage= ,图片缺省时信息。
- tabs= 用于调动{{Tabs}},在使用{{Tabs}}展示作品相关图片的情况下,请不要再使用【image】、【图片信息】和【图片大小】。
- 主体内容部分,z=数字
- 【Row x1】、【Row x2】= ,横栏,colspan数值默认为2。
- 【Row x1 style】、【Row x2 style】= ,横栏样式。
- Row z title= ,对应信息栏左侧内容。
- Row z titlestyle= ,对应信息栏左侧样式。
- Row z info= ,对应信息栏右侧内容。
- Row z infostyle= ,对应信息栏右侧样式。
- Row titlestyle= ,全部信息栏左侧样式,可以被对应样式覆盖。
- Row infostyle= ,全部信息栏右侧样式,可以被对应样式覆盖。
- left-column-color= ,信息栏左侧背景颜色,默认#E0FFFF。
- 下方内容部分
- 【Row h1 title】、【Row h2 title】= ,下栏标题,colspan数值默认为2。
- 【Row h1 titlestyle】、【Row h2 titlestyle】= ,对应样式。
- under-column-color= ,下栏标题背景颜色,默认#62bca9。
- 【Row h1 info】、【Row h2 info】= ,下栏内容,colspan数值默认为2。
- 【Row h1 infostyle】、【Row h2 infostyle】= ,对应样式。
- 【Row b1】、【Row b2】= ,补充项目。
编辑样式
样式1
(待补完)
样式2
{{Infobox
|bg-color = #FFF
|title-color = #C0C0C0
|left-column-color = #75f3fd
|text-color = #FFFFFF
|Title = <span itemprop="name">標題</span>
|image = {{{image|}}}
|image-lostmessage = 圖片不存在時留言
|size = 280px
|caption = <span style="text-align:center;">圖片說明文字</span>
|tabs = {{{tabs|}}}
|Row x1 = '''分割欄'''
|Row x1 style = bgcolor="#C0C0C0"
|Row titlestyle = style="font-weight: bold;" width = 70px
|Row 1 title = 項目1
|Row 1 info = {{{項目1|}}}
|Row 2 title = {{#if:{{{項目2|}}}|項目2標題}} (填寫后觸發的項目)
|Row 2 info = {{{項目2|}}} (填寫后觸發的項目內容)
|Row 3 title = 項目3
|Row 3 info = {{{項目3|}}}
|Row h1 title = {{#if:{{{分割欄2|}}}|'''分割欄2標題'''}}
|under-column-color = #E0FFFF
|Row h1 info = {{{分割欄2|}}}
}}
|
标题
|
图片不存在时留言
|
分割栏
|
项目1 |
项目1内容
|
项目3 |
项目3内容
|
分割栏2标题
|
分割栏2内容
|
|
样式3
(待补完)
样式4
(待补完)
子模板
注释