Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在页面侧面有一个绝对定位的 div,只是有点粘在里面。我已经应用了溢出:隐藏到 html 和父 div,它摆脱了滚动条,但人们仍然可以使用鼠标中键来移动页面。
有没有办法防止任何溢出的内容实际呈现在页面上,或者只是禁止鼠标中键滚动?
也许你需要设置overwflow-x和overflow-y,像这样:
.class { overflow-x: hidden; overflow-y: hidden; }
如果它没有帮助添加一些 !importanta 这种风格。