Template:提示/doc:修订间差异

添加2,590字节 、​ 2020年8月29日 (星期六)
无编辑摘要
无编辑摘要
第1行: 第1行:
 本模板是通常而言对于自定义内容提示框使用的模板,由[[:模板:Ombox]]实现。
 本模板是通常而言对于自定义内容提示框使用的模板,由[[:模板:Ombox]]实现。


== 语法 ==
<nowiki>{{提示|提示的内容}}</nowiki>


== 参数 ==
== 参数 ==
第20行: 第18行:
|-
|-
| textstyle || textstyle || 文字的样式
| textstyle || textstyle || 文字的样式
|}
== 内置的固定样式模板 ==
{| class="wikitable"
|-
! 类型 !! 效果及模板名
|-
| 颜色
| {{ 提示 | text = blue | style = width: auto; float: left; margin: 4px; | template = blue }}
{{ 提示 | text = green | style = width: auto; float: left; margin: 4px; | template = green }}
{{ 提示 | text = orange | style = width: auto; float: left; margin: 4px; | template = orange }}
{{ 提示 | text = yellow | style = width: auto; float: left; margin: 4px; | template = yellow }}
{{ 提示 | text = red | style = width: auto; float: left; margin: 4px; | template = red }}
{{ 提示 | text = purple | style = width: auto; float: left; margin: 4px; | template = purple }}
{{ 提示 | text = indigo | style = width: auto; float: left; margin: 4px; | template = indigo }}
|-
| 带状
| {{ 提示 | text = band | style = width: auto; float: left; margin: 4px; | template = band }}
{{ 提示 | text = band-blue | style = width: auto; float: left; margin: 4px; | template = band-blue }}
{{ 提示 | text = band-green | style = width: auto; float: left; margin: 4px; | template = band-green }}
{{ 提示 | text = band-orange | style = width: auto; float: left; margin: 4px; | template = band-orange }}
{{ 提示 | text = band-yellow | style = width: auto; float: left; margin: 4px; | template = band-yellow }}
{{ 提示 | text = band-red | style = width: auto; float: left; margin: 4px; | template = band-red }}
{{ 提示 | text = band-purple | style = width: auto; float: left; margin: 4px; | template = band-purple }}
{{ 提示 | text = band-indigo | style = width: auto; float: left; margin: 4px; | template = band-indigo }}
|}
== 常用自定义css样式 ==
{| class="wikitable"
|-
! 样式名 !! 代码 !! 实际效果 !! 说明
|-
| 圆角
| <code>border-radius: 8px;</code>
| {{ 提示 | text = 圆角 | style = width: 160px; margin: 4px; border-radius: 8px;}}
| 修改数字可调整圆角大小
|-
| 宽度
| <code>width: 320px;</code>
| {{ 提示 | text = 宽度 | style = width: 320px; margin: 4px; }}
| 修改数字可调整宽度,也可使用80%百分比以指定相对父元素的宽度占比,或使用auto以自适应内容宽度
|-
| 背景颜色
| <code>background-color: #66ccff;</code>
| {{ 提示 | text = 背景颜色 | style = width: 160px; margin: 4px; background-color: #66ccff; }}
| 使用颜色名称,16进制颜色值,也可使用类似 rgba(0,0,0,0.1) 以调整背景透明度
|-
| 边框样式
| <code>border: 3px solid #ec870e;</code>
| {{ 提示 | text = 边框样式 | style = width: 160px; margin: 4px; border: 3px solid #ec870e; }}
| 三个参数分别为边框宽度,边框线形和边框颜色
|}
|}