“`”

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)

可继承: font一size font一family color,;
不可继承 :border padding margin width height
优先级就近原则,样式定义最近者为准;载入样式以最后载入的定位为准;
优先级为: !important > id > class > tag
important 比 内联优先级高

<pre><code> "“`

Was this helpful?

0 / 0

发表回复 0

Your email address will not be published.