开发者

css is getting overridden by .js inserted styles (Alloy UI)

开发者 https://www.devze.com 2023-01-18 23:33 出处:网络
I have a situation where the .css in my head tag is getting overridden by 开发者_如何转开发css that\'s being inserted dynamically into the head by a javascript library.

I have a situation where the .css in my head tag is getting overridden by 开发者_如何转开发css that's being inserted dynamically into the head by a javascript library.

The .js library automatically appends the new .css link to the end of the head tag so it is always put on top of my styles.


You have several options:

  1. Use a different JavaScript library
  2. Make sure all your rules have a higher specificity than the ones added by the library
  3. Learn about !important
0

精彩评论

暂无评论...
验证码 换一张
取 消