css样式:
. {
margin: 0;
padding: 0;
box-sizing: border-box;
}
.s {
position: relative;
margin: 10px auto;
height: 300px;
width: 200px;
border: 1px solid #ff0000;
}
.s1 {
position: absolute;
bottom: 0;
height: 60px;
width: 200px;
/* border: none; */
background-color: #ff0000;
}
html代码:
<div class="s">
<div class="s1"></div>
</div>
没有空白间隙啊
检查下你的浏览器或者windows桌面是不是缩放放大或缩小了
把浏览器和windows桌面缩放设置回100%看看
你好,空白间隙没看到,我用的是chrome浏览器,s1压盖右侧的s倒是真的,因为s有边框。