|
|
| (未显示同一用户的13个中间版本) |
| 第1行: |
第1行: |
| <includeonly>{{#if:{{#varexists:提示样式}}||{{#vardefineecho:提示样式|<bstyle>/*<pre>*/ | | <includeonly>{{CSS|Alert}}<div class="markdown-alert markdown-alert-{{lc:{{{1|}}}}}"><p class="markdown-alert-title">{{{3|{{#switch:{{lc:{{{1|}}}}} |
| | | |note=注意 |
| :root {
| | |tip=提示 |
| --color-note: #0969da;
| | |important=重要 |
| --color-tip: #1a7f37;
| | |warning=警告 |
| --color-warning: #9a6700;
| | |caution=谨慎 |
| --color-severe: #bc4c00;
| | |custom=备注 |
| --color-caution: #d1242f;
| | }}}}}</p><p>{{{2|}}}</p></div></includeonly><noinclude>{{Documentation}}</noinclude> |
| --color-important: #8250df;
| |
| }
| |
| | |
| .markdown-alert {
| |
| padding: 0.5rem 1rem;
| |
| margin-top: 8px;
| |
| margin-bottom: 16px;
| |
| color: inherit;
| |
| border-left: .25em solid #888;
| |
| }
| |
| | |
| .markdown-alert>:first-child {
| |
| margin-top: 0
| |
| }
| |
| | |
| .markdown-alert>:last-child {
| |
| margin-bottom: 0
| |
| }
| |
| | |
| .markdown-alert .markdown-alert-title {
| |
| display: flex;
| |
| font-weight: 500;
| |
| align-items: center;
| |
| line-height: 1
| |
| }
| |
| | |
| .markdown-alert .markdown-alert-title .octicon {
| |
| margin-right: 0.5rem;
| |
| display: inline-block;
| |
| overflow: visible !important;
| |
| vertical-align: text-bottom;
| |
| fill: currentColor;
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-note {
| |
| border-left-color: var(--color-note);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-note .markdown-alert-title {
| |
| color: var(--color-note);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-important {
| |
| border-left-color: var(--color-important);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-important .markdown-alert-title {
| |
| color: var(--color-important);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-warning {
| |
| border-left-color: var(--color-warning);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-warning .markdown-alert-title {
| |
| color: var(--color-warning);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-tip {
| |
| border-left-color: var(--color-tip);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-tip .markdown-alert-title {
| |
| color: var(--color-tip);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-caution {
| |
| border-left-color: var(--color-caution);
| |
| }
| |
| | |
| .markdown-alert.markdown-alert-caution .markdown-alert-title {
| |
| color: var(--color-caution);
| |
| }
| |
| | |
| /*</pre>*/</bstyle>}}}}<div class="markdown-alert {{#switch:{{{1|}}}
| |
| |Note=markdown-alert-note
| |
| |Tip=markdown-alert-tip
| |
| |Important=markdown-alert-important
| |
| |Warning=markdown-alert-warning
| |
| |Caution=markdown-alert-caution
| |
| |Custom=markdown-alert-custom
| |
| |#default=
| |
| }}"><p class="markdown-alert-title">{{#switch:{{{1|}}} | |
| |Note={{#Widget:{{{1|}}} Icon}} | |
| |Tip={{#Widget:{{{1|}}} Icon}}
| |
| |Important={{#Widget:{{{1|}}} Icon}} | |
| |Warning={{#Widget:{{{1|}}} Icon}} | |
| |Caution={{#Widget:{{{1|}}} Icon}} | |
| |Custom|#default= | |
| }}{{{3|{{{1|}}}}}}</p><p>{{{2|}}}</p></div></includeonly>
| |
| <noinclude><h2>Hello</h2> | |
| {{Alert|Note|Highlights information that users should take into account, even when skimming.}}
| |
| {{Alert|Tip|Optional information to help a user be more successful.}}
| |
| {{Alert|Important|Crucial information necessary for users to succeed.}}
| |
| {{Alert|Warning|Critical content demanding immediate user attention due to potential risks.}} | |
| {{Alert|Caution|Negative potential consequences of an action.}}
| |
| <h2>Custom</h2>
| |
| {{Alert|Note|With <code>markers: '*'</code> case of chars is not required and titles are supported.|My title}}
| |
| {{Alert|Custom|Also any other alert name is allowed.}}</noinclude>
| |
本模板用于展示提示信息。
基础用法
{{Alert|Note|即使用户快速浏览时也应考虑的重要信息|注意}}
{{Alert|Tip|帮助用户更高效完成任务的可选信息|提示}}
{{Alert|Important|用户成功操作所必需的关键信息|重要}}
{{Alert|Warning|因存在潜在风险而需要用户立即关注的关键内容|警告}}
{{Alert|Caution|某项操作可能导致的负面后果|谨慎}}
格式自定义
{{Alert|Note|支持 code 标签和自定义标题|我的标题}}
{{Alert|Custom|也可以使用任意其他提示名称|自定义}}