我的Jgrowl代码是:
$(document).ready(function() {
$.jGrowl("<strong>Error!</strong><br />An invalid ID was passed and your template could not be loaded", { sticky: true, theme: 'test' });
});我在Jgrowl中的CSS是:
.test{
background-color: #000000;
}但它并没有将CSS应用到盒子上。我可能误用了主题选项,但我很难找到很多关于它的文档。
发布于 2011-01-31 19:00:56
通知背景色被"div.jGrowl div.jGrowl- .test“样式覆盖。你可以使.test风格!重要的:
.test{
background-color: #000000 !important;
}或者更具体地访问.test类,如下所示:
"div.jGrowl div.jGrowl-notification.ui-state-test"这也将覆盖它
发布于 2019-04-02 03:55:13
您可以使用jGrowl的配置选项参数
主题是一个指定此特定消息的自定义样式的CSS类,旨在与jQuery UI一起使用。
CSS:
.jGrowl .changeCount {
background-color: #337ab7;
}JS:
$.jGrowl("Message in box", {theme: 'changeCount'});有关此插件的更多信息,请单击此处:https://github.com/stanlemon/jGrowl/blob/master/README.md
https://stackoverflow.com/questions/4849724
复制相似问题