我需要知道如何为notify.js
警报应用css
样式。
这是我的代码-
$.notify({
message: "Alert!"
}, {
type: 'danger',
animate: {
enter: 'animated fadeInUp',
},
placement: {
from: "top",
align: "center"
},
offset: 20,
spacing: 10,
z_index: 1031,
});
我需要为此应用一些样式。
发布于 2017-12-11 09:52:29
$.notify({
message: "Alert!"
}, {
type: 'danger',
animate: {
enter: 'animated fadeInUp',
},
placement: {
from: "top",
align: "center"
},
offset: 20,
spacing: 10,
z_index: 1031,
style: 'addClassName'
});
然后在html中构造一个这样的结构用于通知。
<div class="notifyjs-addClassName-base notifyjs-addClassNamesuccess">
<div class="clearfix">
<div class="title" data-notify-html="title">Would you like some Foo ?
</div>
<div class="buttons">
<button class="no">Cancel</button>
<button class="yes" data-notify-text="button">Confirm</button>
</div>
</div>
</div>
然后,您可以根据需要创建1个css文件,并添加css,使此.notifyjs-addClassName-base
成为基类。
.notifyjs-addClassName-base{
}
https://stackoverflow.com/questions/47749432
复制相似问题