twitter-bootstrap – 使toastr警报看起来像引导警报
发布时间:2020-12-18 00:17:21 所属栏目:安全 来源:网络整理
导读:我想让toastr的弹出窗口看起来与Bootstrap警报相同或非常接近.我该怎么做? 解决方法 包括用于Bootstrap警报的CSS,然后在toastr选项中,更改toastClass和iconClasses的值: toastr.options = { toastClass: 'alert',iconClasses: { error: 'alert-error',info
我想让toastr的弹出窗口看起来与Bootstrap警报相同或非常接近.我该怎么做?
解决方法
包括用于Bootstrap警报的CSS,然后在toastr选项中,更改toastClass和iconClasses的值:
toastr.options = { toastClass: 'alert',iconClasses: { error: 'alert-error',info: 'alert-info',success: 'alert-success',warning: 'alert-warning' } }, 然后在toastr的CSS中,从#toast-container>中删除dropshadow div,最终看起来像: #toast-container > div { width: 300px; } 你可以离开填充,如果你想要,或添加到你自己的CSS文件,而不是编辑toastr(可能最好,只是确保你的以后加载). (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |