Does the order of css stylesheet definitions matter?

前端 未结 7 870
情歌与酒
情歌与酒 2021-02-07 04:02

I have several stylesheets. The first one is a stylesheet with some styles that I would like to use as defaults. Depending on several factors, the code being used to generate

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-07 04:11

    Yes, that is how stylesheets work. The last one wins.

    Just be sure the specificity of the default style sheet isn't greater than your override. And yes, avoid !important if you can. It's just silly.

提交回复
热议问题