我的网站上有一个模态框,里面有内容。但是,我注意到在手机上我无法在内容中滚动。它似乎是“固定的”,没有滚动条。
我的 JSFiddle 在这里:http://jsfiddle.net/g1kbvn0s/embedded/result/从这里你可以看到我的 CSS 和 Javascript。我还在下面附上了我的 CSS:
/* line 863, ../sass/_layout.scss */
html.cinema-viewer {
overflow: hidden !important;
}
/* line 871, ../sass/_layout.scss */
#cinema-overlay {
background-color: rgba(0, 0, 0, 0.95);
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
z-index: 99999 !important;
overflow: hidden;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
非常感谢您的帮助:)
最佳答案
尝试添加
#cinema-overlay {
overflow-y: scroll;
position:absolute;
}
并删除
overflow:hidden
来自同一个元素。
关于javascript - 在模式中滚动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26424167/