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

模板:InfoBox

来自Board Game Arena
DogEgg258讨论 | 贡献2024年7月15日 (一) 02:48的版本 (创建页面,内容为“<div style="float:{{{float|none}}};clear:both;display:flex;margin:8px;"><div class="mw-collapsible mw-{{{state|}}}" style="display:flex;flex-flow:column wrap;min-width:{{{minWidth|}}};max-width:{{{maxWidth|600}}}px;border-radius:{{{corner|0.5}}}rem;background:{{{color|linear-gradient(to bottom right,{{{colorA|#c00}}},{{{colorB|#703}}},{{{colorC|#307}}})}}};"><div class="mw-collapsible-toggle" style="box-sizing:border-box;width:100%;padding:0.5rem;text-align:{{{…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索
{{{title}}}
{{{body}}}

To use this infoBox template, type:

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

with the title and body when editing the page.

Parameters

Parameter
Default value
Example
Result
Description
title
null
{{infoBox |title=Example}}
Example
{{{body}}}
Optional: specify a title.
body
null
{{infoBox |body=Body content}}
Example
Body content
Optional: specify any body content.
state
null
{{infoBox |state=collapsed}}
Example
Body content
Optional: collapsed by default.
float
none
{{infoBox |float=right}}
Example
Body content
Optional: Place on the left or right side of its container, allowing text to wrap around it.
minWidth
null
{{infoBox |minWidth=100%}}
Example
Body content
Optional: specify the minimum width as a CSS length e.g. 500px.
maxWidth
600
{{infoBox |maxWidth=80}}
Example
Body content
Optional: specify the maximum width in px units.


Tip: use {{infoBox |maxWidth=}} (empty) to remove the maxWidth limit.
color
linear-gradient(
to bottom right,
{{{colorA|#c00}}},
{{{colorB|#703}}},
{{{colorC|#307}}})
{{infoBox |color=green}}
Example
Body content
Optional: specify a single color of the infoBox as a CSS color e.g. green.
colorA
#c00 (red)
{{infoBox |colorA=lightgreen}}
Example
Body content
Optional: specify the top left corner color gradient of the infoBox as a CSS color e.g. green.
colorB
#703 (dark pink)
{{infoBox |colorB=lightgreen}}
Example
Body content
Optional: specify the middle color gradient of the infoBox as a CSS color e.g. green.
colorC
#307 (dark blue)
{{infoBox |colorC=lightgreen}}
Example
Body content
Optional: specify the bottom right corner color gradient of the infoBox as a CSS color e.g. green.
bodyBgColor
#fffc (translucent white)
{{infoBox |bodyBgColor=lightgreen}}
Example
Body content
Optional: specify the body background color as a CSS color e.g. green.
titleColor
#fff (white)
{{infoBox |titleColor=lightgreen}}
Example
Body content
Optional: specify the title color as a CSS color e.g. green.
bodyColor
#202122 (black)
{{infoBox |bodyColor=green}}
Example
Body content
Optional: specify the title color as a CSS color e.g. green.
titleAlign
center
{{infoBox |titleAlign=left}}
Example
Body content
Optional: specify the title alignment as left or right.
corner
0.5
{{infoBox |corner=1}}
Example
Body content
Optional: specify the corner radius in rem units.

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

To use a double infoBox template, type:

{{infoBoxes
|title1=Example 1
|body1=
|title2=Example 2
|body2=
}}

with the title and body when editing the page.

Additional parameters

Parameter
Default value
Example
Description
title#
null
{{infoBoxes |title2=Example}}
Optional: specify a title.
body#
null
{{infoBoxes |body2=Body content}}
Optional: specify any body content.
color#
linear-gradient
{{infoBoxes |color2=green}}
Optional: specify a single color of each infoBox as a CSS color e.g. green.
colorD
#00c (blue)
{{infoBoxes |colorD=green}}
Optional: specify the bottom right corner color of the second infoBox as a CSS color e.g. green.
title#color
#fff
{{infoBoxes |title2Color=black}}
Optional: specify the title color as a CSS color e.g. green.

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

To use a triple infoBox template, type:

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

with the title and body when editing the page.

Additional parameters

Parameter
Default value
Example
Description
colorE
#037 (dark cyan)
{{infoBoxes3 |colorE=green}}
Optional: specify the bottom right corner color of the third infoBox as a CSS color e.g. green.

English documentation

  • [en.doc.boardgamearena.com/Template:InfoBox Template:InfoBox]
  • [en.doc.boardgamearena.com/Wiki_formatting Formatting]