does the order of styles matter?

前端 未结 5 1467
不知归路
不知归路 2021-01-31 16:27

below is my markup. when i move the mouse over the hyperlinks they get underlined and turn red. but if i swap the order of the last two rules, the hyperlinks still get underline

5条回答
  •  情书的邮戳
    2021-01-31 16:44

    Yes, it does. The last point of the cascading order reads:

    Finally, sort by order specified: if two declarations have the same weight, origin and specificity, the latter specified wins. Declarations in imported style sheets are considered to be before any declarations in the style sheet itself.

提交回复
热议问题