模板:Msgbox

出自Terraria Wiki
跳至導覽 跳至搜尋
This template is i18n-ready, which means it is easy to localize for different languages. Please see I18n & l10n for templates to learn more.
See Template:Msgbox/l10n for the localization of this template.
Template-info.svg 文檔 以下文檔來自Template:Msgbox/doc。(編輯 | 歷史

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>
| nosnippet = n/no
}}
參數描述類型狀態
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
示例:
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
推薦
HTML attribute "data-nosnippet"nosnippet
Removes the data-nosnippet attribute from the box. It is added by default so that the box does not show up in the preview text of search engines.
示例:
no
布爾值
可選

Examples

For compatibility with wiki.gg's theme, hardcoded background/border colors should be avoided. Instead, use one of the predefined classes listed below, which are styled for the different themes.

Code Result
{{msgbox|text=Message box text|class=msgbox-color-blue}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-red}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-purple}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-green}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-yellow}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-orange}}
Message box text
{{msgbox|text=Message box text|class=msgbox-color-pink}}
Message box text
{{msgbox|text=Message box text}}
Message box text