【发布时间】:2013-10-14 16:56:28
【问题描述】:
我在 Chrome 中遇到了 overflow-y 属性的问题。
即使我将它设置为hidden,我仍然可以使用鼠标滚轮滚动页面。
这是我的代码:
html,
body {
overflow-y: hidden;
}
#content {
position: absolute;
width: 100%;
}
.step {
position: relative;
height: 500px;
margin-bottom: 500px;
}
<body>
<div id="content">
<div class="step">this is the 1st step</div>
<div class="step">this is the 2nd step</div>
<div class="step">this is the 3rd step</div>
</div>
</body>
有人知道如何在 Chrome 中阻止垂直滚动吗?
谢谢!
【问题讨论】:
-
只想链接这篇相关的帖子,并为仍在寻找它的人提供答案:link。
标签: css google-chrome scroll scrollbar overflow