Can I use jquery to remove/negate css !important rule?

后端 未结 5 1400
挽巷
挽巷 2020-12-16 12:07

If there is a CSS rule that uses !important, is there a way to remove the !important rule so that I can make further downstream style changes with

5条回答
  •  感动是毒
    2020-12-16 12:28

    Just add a style="" tag to any images with this issue, hopefully they all have some sort of defining class to them that it's easy to do so.

    $('div.stubborn').attr('style', 'display: inline !important;');​
    

    jsFiddle DEMO

提交回复
热议问题