CSS Disabled scrolling

前端 未结 3 993

I came across an issue with one of our web sites:

In IE9 the page had a vertical scrollbar, but you couldn\'t use the mousewheel, arrow keys, pgup/pgdwn to scroll.

相关标签:
3条回答
  • 2020-12-03 05:05

    overflow-x: hidden;
    would hide any thing on the x-axis that goes outside of the element, so there would be no need for the horizontal scrollbar and it get removed.

    overflow-y: hidden;
    would hide any thing on the y-axis that goes outside of the element, so there would be no need for the vertical scrollbar and it get removed.

    overflow: hidden;
    would remove both scrollbars

    0 讨论(0)
  • 2020-12-03 05:25

    Try using the following code snippet. This should solve your issue.

    body, html { 
        overflow-x: hidden; 
        overflow-y: auto;
    }
    
    0 讨论(0)
  • 2020-12-03 05:25

    I use iFrame to insert the content from another page and CSS mentioned above is NOT working as expected. I have to use the parameter scrolling="no" even if I use HTML 5 Doctype

    0 讨论(0)
提交回复
热议问题