因为用户代理样式闹的,外边距加了8像素,
百度搜,看有修改浏览器的设置的,有砸屏幕的
这里不用那么麻烦
在body里覆盖掉就可以了
<style>
body {
margin: 0 !important;
}
.d1 {
margin: 0;
background-color: red;
height: 20px;
}
</style>


因为用户代理样式闹的,外边距加了8像素,
百度搜,看有修改浏览器的设置的,有砸屏幕的
这里不用那么麻烦
在body里覆盖掉就可以了
<style>
body {
margin: 0 !important;
}
.d1 {
margin: 0;
background-color: red;
height: 20px;
}
</style>
本文标题:2022-09-22 body外边距多了8像素
本文链接:https://www.haomeiwen.com/subject/dpgwortx.html
网友评论