Terraria Wiki
Advertisement
This template is i18n-ready, which means it is easy to localize for different languages. Please see 18n & l10n for template to learn more.
See Template:Msgbox/l10n for the localization of this template.
Template-info Documentation The documentation below is transcluded from Template:Msgbox/doc. (edit | history)

This template displays a basic message box.

Usage[]

All parameters are optional.

{{msgbox
| class = <css classes>
| style/css = <css styles>
| width = <box width>
| image = <personal image choice>
| imagesize = <image size>
| imagelink = <image link>
| imagetext = <image alt text>
| imagealt = <completely custom image display>
| discuss = y/yes
| discusspage = <discuss page>
| discussanchor <discuss section name>
| title = <box title>
| text = <box text>
}}
参数描述类型状态
CSS classclass
Custom CSS class
默认值:
msgbox
单行文本可选
CSS stylestyle
css
Inline CSS style; overrides $bgcol and $width
单行文本可选
Background colorbgcol
Background color of the box
示例值:
#E4F0F7
单行文本弃用
see below
Box widthwidth
Width of the box
示例值:
200px
单行文本可选
Box imageimage
Image that is displayed in the box on the left
示例值:
Icon-warning-yellow.svg
文件可选
Image sizeimagesize
Size of the $image
默认值:
32px
单行文本可选
Image textimagetext
Alt text for $image
单行文本可选
Custom imageimagealt
Completely custom image display; overrides $image and $imagesize
wikitext片段可选
Discuss optiondiscuss
Adds a link to the current page's talk page (or $discusspage); only has an effect if a $title is set
布尔可选
Discuss linkdiscusspage
The page that $discuss will link to
单行文本可选
Discuss anchordiscussanchor
The section on the page that $discuss will link to
单行文本可选
Box titletitle
Title of the box
字符串可选
Main texttext
Text inside the box
wikitext片段推荐

Colors[]

For compatibility with FandomDesktop's dark theme, hardcoded background/border colors should be avoided. Instead, use one of the predefined classes listed below, which are styled for both light and dark themes:

Class Color
msgbox-color-blue
msgbox-color-red
msgbox-color-purple
msgbox-color-green
msgbox-color-yellow
msgbox-color-orange
msgbox-color-pink

zh:Template:Msgbox

Advertisement