css优先级问题

1.优先级顺序为:!important>style>权重值

2. 如果权重相同,则最后定义的样式的起作用,应该避免这种情况出现

  • 标签的权重为1
  • class的权重为10
  • id的权重为100