!important Overridden

前端 未结 3 1363
被撕碎了的回忆
被撕碎了的回忆 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:06

    !important does over ride anything at the same hierarchy-level -- but a user's style sheet with an !important declaration is like unbeatable.

    The full heirarchy is linked style sheet < embeded styles in head < in doc style block (before affected element) < in-line style (depriciated) < in-element style (style="" attr)

    This is why they are called Cascading Style Sheets for the record

    So a linked style sheet with an !important declaration, as you can see, isn't all THAT !important after all.

    Firebug uses on-the-fly user declarations with !important for alot of its tools (such as highlight divs/links/etc.)

    Try viewing without Firebug. If that changes it, its firebug transforming it

提交回复
热议问题