我将几个 div 包裹在 div 容器内,我可以看到边框和元素之间有一些奇怪的空间。问题发生在chrome 和 edge上。我尝试了Mozilla,效果很好。
我正在使用 bootstrap 和一些自定义 CSS。
我也分享相关代码:
.fullScreen {
height: 100vh;
width: 100vw;
}
.mainContainer {
align-items: center;
justify-content: flex-start;
}
.row {
margin: 0!important;
}
#box {
margin: 0 0 0 5vh;
height: 90vh;
width: 90vh;
}
.rowEndings {
height: 36vh;
}
.rowMid {
height: 18vh;
}
@media (orientation: portrait) {
.mainContainer {
align-items: flex-start;
justify-content: center;
}
}
Run Code Online (Sandbox Code Playgroud)
<!-- adding bootstrap css -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" …
Run Code Online (Sandbox Code Playgroud)