What are the priorities among CSS selectors

前端 未结 9 1581
日久生厌
日久生厌 2020-11-27 22:27

CSS Question: If two different selectors apply to an element, who wins?

I know this shouldn\'t happen, but I want to tweak a legacy application, and the CSS is getti

9条回答
  •  清歌不尽
    2020-11-27 22:52

    It should happen! That's why it's called CASCADING style sheets. You can find an example of the priorities here

提交回复
热议问题