Does the order of css stylesheet definitions matter?

前端 未结 7 966
情歌与酒
情歌与酒 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

    yep - the clue is on the name 'cascading' stylesheets. So an inline style will overwrite an style that is defined in the head and a style in the head will overwrite a style in a style sheet. The last style sheet load could overwrite the styles in the previous one loaded. If you use something like firebug or the inspector in chrome it will show you where each style has come from or what it has overidden.

提交回复
热议问题