问题描述
废话不多说,直接上代码
html
<div class="box1">
</div>
<div class="box2">
</div>
<div class="box3">
</div>
css
.box1,
.box2,
.box3 {
width: 20px;
height: 20px;
background-color: #E11;
display: inline-block;
}
效果图
解决方法
各个标签之间,不能有空格
html
<div class="box1">
</div><div class="box2"> // 标签前后没有空格
</div><div class="box3">
</div>