Alerts
Gitbook 插件:对提示框的增强。
有两个类似的插件:
gitbook-plugin-alerts
gitbook-plugin-flexible-alerts
下面的插件是增强版,这里使用第二个。
[!TIP|style:flat|iconVisibility:hidden|labelVisibility:hidden] npm i gitbook-plugin-flexible-alerts
https://github.com/zanfab/gitbook-plugin-flexible-alerts#readme
添加不同 alerts
样式的 blockquotes
,目前包含四种样式:
NOTE
TIP
WARNING
DANGER
{
"plugins": ["flexible-alerts"]
}
下面是使用示例:
Info styling
> [!NOTE]
> An alert of type 'note' using global style 'callout'.
Info flat
> [!NOTE|style:flat]
> An alert of type 'note' using alert specific style 'flat' which overrides global style 'callout'.
Tip style
> [!TIP|style:flat|label:My own heading|iconVisibility:hidden]
> An alert of type 'tip' using alert specific style 'flat' which overrides global style 'callout'.
> In addition, this alert uses an own heading and hides specific icon.
Warning styling
> **[!WARNING] For warning**
> Use this for warning messages.
danger styling
> **[!DANGER] For danger**
> Use this for danger messages.
效果如下所示:
Info styling
[!NOTE] An alert of type 'note' using global style 'callout'.
Info flat
[!NOTE|style:flat] An alert of type 'note' using alert specific style 'flat' which overrides global style 'callout'.
Tip style
[!TIP|style:flat|label:My own heading|iconVisibility:hidden] An alert of type 'tip' using alert specific style 'flat' which overrides global style 'callout'. In addition, this alert uses an own heading and hides specific icon.
Warning styling
[!WARNING] For warning Use this for warning messages.
danger styling
[!DANGER] For danger Use this for danger messages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论