两个div,一上一下,怎么用纯CSS让他们显示在同一行啊
3 回答
已采纳
西兰花伟大炮
TA贡献376条经验 获得超318个赞
<style>
.box{
width: 100px;
height: 100px;
background-color: red;
display: inline-block
}
.box2{
width: 100px;
height: 100px;
background-color:blue;
display: inline-block
}
</style>
</head>
<body>
<div class="box">div1</div>
<div class="box2">div2</div>添加回答
举报
0/150
提交
取消
