callout
展示 拼出一个页面的那些小块语汇:状态、身份、进度、数据表格和图表,以及唯一的那种提示形状。
唯一的一套提示语汇:着色条、色调图标、可选的粗体标题、一段正文。
每个示例都能真实操作,但其中的链接不会跳转到任何地方。 HTML 显示可复制的标记。
info
<div rst-callout rst-tone ="info" >
<span rst-callout-ic aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="10" /><path d ="M12 16v-4" /><path d ="M12 8h.01" /></svg >
</span >
<div rst-callout-body >
<p >在网站发布之前,文章仅对会员可见。</p >
</div >
</div >
positive
<div rst-callout rst-tone ="positive" >
<span rst-callout-ic aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="10" /><path d ="m9 12 2 2 4-4" /></svg >
</span >
<div rst-callout-body >
<strong >付款已连接</strong >
<p >现在可以收取门票款项了。</p >
</div >
</div >
warning
<div rst-callout rst-tone ="warning" >
<span rst-callout-ic aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><path d ="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z" /><path d ="M12 9v4" /><path d ="M12 17h.01" /></svg >
</span >
<div rst-callout-body >
<strong >连接付款即可开始销售</strong >
<p >你的活动已上线,但还不能收款。</p >
</div >
</div >
negative
<div rst-callout rst-tone ="negative" >
<span rst-callout-ic aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="10" /><path d ="m15 9-6 6" /><path d ="m9 9 6 6" /></svg >
</span >
<div rst-callout-body >
<strong >上一次导入失败了</strong >
<p >没有做任何更改。修正第 91 行后重试。</p >
</div >
</div >
negative,并作为警报播报
role="alert" 让屏幕阅读器在它出现时立即播报。只把它留给不能等的消息。
<div rst-callout rst-tone ="negative" role ="alert" >
<span rst-callout-ic aria-hidden ="true" >
<svg class ="icon" viewBox ="0 0 24 24" fill ="none" stroke ="currentColor" stroke-width ="2" stroke-linecap ="round" stroke-linejoin ="round" aria-hidden ="true" ><circle cx ="12" cy ="12" r ="10" /><path d ="m15 9-6 6" /><path d ="m9 9 6 6" /></svg >
</span >
<div rst-callout-body >
<strong >导入已停止</strong >
<p >没有做任何更改。修正第 91 行后重试。</p >
</div >
</div >