2.2层次选择器
- 后代选择器:在某个元素的后面
/*后代选择器*/
body p{
background: red;
}
- 子选择器:一代,儿子
/*子选择器*/
body>p{
background: #267fc4;
}
- 相邻兄弟选择器 :同辈
2.2层次选择器
/*后代选择器*/
body p{
background: red;
}
/*子选择器*/
body>p{
background: #267fc4;
}