"+" 号 : 相邻兄弟选择 ( Adjacent sibling selector ),比如:
h1 + p {
margin-top: 10px;
}
上述代码意思是:在同一个父容器下,选择紧跟在 h1 标签后的 p 元素
">" 号 : 子元素选择器(Child selector) ,比如:
body > h1{
margin-top: 0;
padding-top: 0;
}
上述代码意思是:选择 body 下的第一个 h1 元素
CSS 伪元素
:first-child
ul >: first-child {
background:yellow;
}
上述代码意思是:选择 ul 下的第一个 子元素,如果是
li:first-child
则是选择 列表下的第一个 li 元素
http://www.runoob.com/cssref/css-selectors.html