!important Overridden

前端 未结 3 1334
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 20:24

I am using JQuery mobile and I want all of the text to be purple on my application. I did this: color: #7A68AE !important; in my body section of my

3条回答
  •  走了就别回头了
    2021-01-18 21:23

    This might have happened because of many reasons. For example:

    • one your !important clause was overriden by another!important clause, with more specific selector (Edit: one of other people answering your question, Brad, pointed a resource about it: www.w3.org/TR/CSS2/cascade.html#specificity),
    • you have used some inline styles for specific element,
    • you used JavaScript to actually add some inline styles into the element,

    You said you have Firebug, so you should be able to determine what is the case. See with JS enabled and disabled, see styles applied for specific selectors and see resulting styles. Without the code there is not much we can say about that.

提交回复
热议问题