6.选择器的优先级.html 534 B

1234567891011121314151617
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <!--
  10. css优先级
  11. 选择器:!important > 内联样式 > id选择器 > 类选择器 = 伪类选择器 = 属性选择器 > 伪元素选择器 = 标签选择器 > 通配符选择器
  12. 权重: 正无穷 1,0,0,0 0,1,0,0 0,0,1,0 0,0,0,1 0,0,0,0
  13. -->
  14. </body>
  15. </html>