我正在尝试删除 AddToAny Wordpress 插件的默认背景图像图标。正如您在下面的 URL 中看到的,蓝色图标将被黑色齿轮取代。问题是蓝色图标是由内联样式引入的,在插件中有一个 !important 声明。 :(
他们的内联代码:
.a2a_dd.addtoany_share_save {
background: url(http://www.dlillianphotography.com/staging/wp-content/plugins/add-to-any/favicon.png) no-repeat scroll 4px 0px !important;
}
我的代码,希望嵌套/层次结构会有所帮助:
.social .row:first-of-type .addtoany_list .a2a_dd.addtoany_share_save {
background: #fff !important;
}
感谢阅读。
最佳答案
你可以用 jQuery 来做
('.a2a_dd.addtoany_share_save').removeAttr( "style" );
那么你的风格就可以了
关于css - 在 Wordpress 插件中覆盖 CSS 背景图片,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24620583/