在写移动端页面时,内容很多需要纵向滚动,但是设置纵向滚动条后,因为滚动条占了像素点,导致页面出现横向滚动条,解决方案:
.page {
width: 750px;
max-width: 100%;
min-height: 100vh;
background-color: #1f0d04;
position: relative;
overflow-y: auto;
overflow-x: hidden;
}
在写移动端页面时,内容很多需要纵向滚动,但是设置纵向滚动条后,因为滚动条占了像素点,导致页面出现横向滚动条,解决方案:
.page {
width: 750px;
max-width: 100%;
min-height: 100vh;
background-color: #1f0d04;
position: relative;
overflow-y: auto;
overflow-x: hidden;
}