Template:Info
模板页面
更多操作
(重定向自Template:提示框)
提示内容
效果预览
以下为默认提示框效果(未填任何参数):
提示内容
简洁正文示例:
这是正文内容
带标题示例:
注意
本条目内容可能随时间变化
---
类型与颜色预览
| 类型 | 调用示例 | 实际效果 |
|---|---|---|
| 信息 (info) | {{info|text=这是信息提示}} |
这是信息提示 |
| 警告 (warn) | {{info|text=这是警告提示|color=#f0ad4e|backgroundColor=#fff8e5}} |
这是警告提示 |
| 错误 (error) | {{info|text=这是错误提示|color=#d9534f|backgroundColor=#f8d7da}} |
这是错误提示 |
| 成功 (success) | {{info|text=这是成功提示|color=#5cb85c|backgroundColor=#d4edda}} |
这是成功提示 |
---
简要说明
- 参数
text为必填,其它参数均为选填。 - 参数
1可直接代替text。 - 使用
title可增加标题,使用below可增加脚注或底部说明。 - 使用
type可以控制模板分类:
**top(默认):页顶提示模板 **middle:页中提示模板 **none:无分类
---
完整参数示例
{{info
|width=
|color=
|backgroundColor=
|leftimage=
|icon-style=
|smallimage=
|title=
|title-style=
|text=
|text-style=
|below=
|below-style=
|class=
|type=
}}
参数解析
|width = 模板宽度,默认为 100%
|color = 左侧竖条颜色,默认 #36c
|backgroundColor = 背景颜色,默认 #f8f9fa
|leftimage = 左侧图标,默认 [[File:Icon-info.png|40px|link=]],会覆盖 smallimage 参数
|icon-style = 图标样式,可使用行内 CSS
|smallimage = 图标大小控制,非空时图标为 25px,否则 40px
|title = 标题内容
|title-style = 标题样式(行内 CSS,例如 color:red; font-style:italic;)
|text = 正文内容,可等效使用 content 或 1 参数
|text-style = 正文样式,可等效使用 content-style
|below = 底部内容
|below-style = 底部样式
|class = 模板额外 class
|type = 模板类型,仅供模板页使用:
top(默认)= 页顶提示模板
middle = 页中提示模板
none = 无分类
使用示例
{{info|text=这是正文内容}}
{{info
|title=注意
|text=本条目内容可能随时间变化
|below=底部提示
|color=#f0ad4e
|backgroundColor=#fff8e5
}}
{{info|1=简洁正文内容示例}}