CSS 2, precedence of stylesheets imported using link element

前端 未结 4 1080
滥情空心
滥情空心 2021-01-13 22:26

Given



<         


        
4条回答
  •  孤城傲影
    2021-01-13 23:02

    The highest precedence goes to inline styles. style rules from external stylesheets follow a simple formula (see http://www.htmldog.com/guides/cssadvanced/specificity/)

    as to the order of sheets, the rules in the last sheet would take precedence in the event of a collision (unless you use the !important flag)

    edit: better ref on specificity http://css-tricks.com/specifics-on-css-specificity/

提交回复
热议问题