本文主要是介绍CSS 中相邻节点中在同一个父节点的样式关系,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
demo:
<div class="content">
<div class="messager-question"></div>
<div></div>
</div>
要想设置没有class名的div我们可以这样做:
.message-question + div{
width:100px;
height:100px;
margin-right:30px;
}
这篇关于CSS 中相邻节点中在同一个父节点的样式关系的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!