您的位置:首页 > Web前端 > CSS

CSS 后代选择器

2017-12-05 15:27 281 查看
.ppzx{ margin-top:30px;}
.ppzx .left{ width:253px; float:left;}
.ppzx .right{ width:700px; line-height:38px; color:#1e5836; padding-left:50px; float:left; background:url(home_23.jpg); height:40px;;}

.test{ margin-top:30px;}
.test .left{ width:253px; float:left;}
.test .right{ width:700px; line-height:38px; color:#1e5836; padding-left:50px; float:left; background:url(home_23.jpg); height:40px;;}

<div class="ppzx">
<div class="left"></div>
<div class="right"></div>
</div>

<div class="test">
<div class="left"></div>
<div class="right"></div>
</div>

其中test 和 ppzx 下面的2个left,right 互不干扰


  
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: