摘要:
1.如果选择器一样,使用就近原则 2.如果选择器不一样(ID选择器/类选择器/标签选择器),采用具体性原则,谁更具体谁生效;ID选择器>类选择器>标签选择器 3.重要性原则 .h1{color: green ! important;} ! important 表示最重要,不会被其他选择器覆盖掉 总结 阅读全文
posted @ 2021-09-06 23:10
安静ovo
阅读(298)
评论(0)
推荐(0)
摘要:
标签选择器: <style> h1{ width: 960px; height: 30px; backgroung-color: cyan; } <style/> 类选择器: <style> h1{ width: 960px; height: 30px; margin: 0 auto; } .a { 阅读全文
posted @ 2021-09-06 09:35
安静ovo
阅读(869)
评论(0)
推荐(0)