当我添加一个高度大于页面大小的 div 时,即使我添加了 overflow:scroll
,正文也不会滚动。我什至尝试过 overflow:auto;
最佳答案
添加高度100%
#first {
position: fixed;
left: 0;
right: 0;
z-index: 0;
margin-left: 20px;
margin-right: 20px;
overflow: auto;
height:100%;/* Add This*/
}
关于javascript - body 不会在溢出时滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43273598/