This is a documentation for Board Game Arena: play board games online !

模板:InfoBox

来自Board Game Arena
DogEgg258讨论 | 贡献2024年7月15日 (一) 04:41的版本
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索
{{{title}}}
{{{body}}}

使用InfoBox时,你需要在页面中输入:

{{infoBox
|title=Example
|body=
}}

一个InfoBox包含一个标题(Title)和一个内容(Body)。

参数

参数名
预设值
例子
结果
介绍
title
null
{{infoBox |title=Example}}
Example
{{{body}}}
定义标题
body
null
{{infoBox |body=Body content}}
Example
Body content
定义内文
state
null
{{infoBox |state=collapsed}}
Example
Body content
可选: 默认折叠
float
none
{{infoBox |float=right}}
Example
Body content
可选: 置左 left 或置右 right ,允许被文字包围。
minWidth
null
{{infoBox |minWidth=100%}}
Example
Body content
可选:CSS宽度定义最少宽度 e.g. 500px.
maxWidth
600
{{infoBox |maxWidth=80}}
Example
Body content
可选: 定义最大宽度


Tip: 使用{{infoBox |maxWidth=}} (留空)取消宽度限制
color
linear-gradient(
to bottom right,
{{{colorA|#c00}}},
{{{colorB|#703}}},
{{{colorC|#307}}})
{{infoBox |color=green}}
Example
Body content
可选:CSS颜色 定义框的单色 e.g. green.
colorA
#c00 (red)
{{infoBox |colorA=lightgreen}}
Example
Body content
可选:CSS颜色 定义框在渐变中的左上色 e.g. green.
colorB
#703 (dark pink)
{{infoBox |colorB=lightgreen}}
Example
Body content
可选:CSS颜色 定义框在渐变中的中间色 e.g. green.
colorC
#307 (dark blue)
{{infoBox |colorC=lightgreen}}
Example
Body content
可选:CSS颜色 定义框在渐变中的右下色 e.g. green.
bodyBgColor
#fffc (translucent white)
{{infoBox |bodyBgColor=lightgreen}}
Example
Body content
可选:CSS颜色 定义框内文背景色 e.g. green.
titleColor
#fff (white)
{{infoBox |titleColor=lightgreen}}
Example
Body content
可选:CSS颜色 定义标题文字颜色 e.g. green.
bodyColor
#202122 (black)
{{infoBox |bodyColor=green}}
Example
Body content
可选:CSS颜色 定义标题文字颜色 e.g. green.
titleAlign
center
{{infoBox |titleAlign=left}}
Example
Body content
可选: 定义标题置左left或右right
corner
0.5
{{infoBox |corner=1}}
Example
Body content
可选: 定义圆角px

{{{标题1}}}
{{{内容1}}}
{{{标题2}}}
{{{内容2}}}

要使用2个InfoBoxes在一起时,输入

{{infoBoxes
|title1=例子1
|body1=
|title2=例子2
|body2=
}}

新增参数

参数名
预设值
例子
介绍
title#
null
{{infoBoxes |title2=Example}}
可选: 定义标题
body#
null
{{infoBoxes |body2=Body content}}
可选: 定义内文
color#
linear-gradient
{{infoBoxes |color2=green}}
可选:CSS颜色 定义两个框的单色,例如 green.
colorD
#00c (blue)
{{infoBoxes |colorD=green}}
可选:CSS颜色 定义右框的右下角颜色 e.g. green.
title#color
#fff
{{infoBoxes |title2Color=black}}
可选:CSS颜色 定义标题文字颜色 e.g. green.

{{{title1}}}
{{{body1}}}
{{{title2}}}
{{{body2}}}
{{{title3}}}
{{{body3}}}

要使用3个InfoBoxes在一起时,输入

{{infoBoxes3
|title1=Example 1
|body1=
|title2=Example 2
|body2=
|title3=Example 3
|body3=
}}

增加参数

参数名
预设值
例子
介绍
colorE
#037 (dark cyan)
{{infoBoxes3 |colorE=green}}
可选:CSS颜色 定义最右框的右下角颜色 e.g. green e.g. green.

English documentation