1.CSS选择器有哪些?
1.id选择器( # myid)2.类选择器(.myclassname)3.标签选择器(div, h1, p)4.相邻选择器(h1 + p)5.子选择器(ul > li)6.后代选择器(li a)7.通配符选择器( * )8.属性选择器(a[rel = "external"])9.伪类选择器(a:hover, li:nth-child) |
2.CSS3盒子模型
(1)box-sizing: content-box; 盒子大小为 width + padding + border (2)box-sizing: border-box; 盒子大小为 width |
3.简述CSS优先级(权重规则)
!important > 行内样式style > ID > 属性选择器/class类/伪类选择器 > 元素/标签选择器 > 继承; |