简体   繁体   中英

Disable Horizontal Scrolling Android

I have a weird issue with horizontal scrolling to the right

  • I already made html/body width max at 100% and overflow-x hidden
  • no elements outside viewport or negative margins to the right
  • this issue isn't present on desktop
  • meta user-scalable=no
  • horizontal scrolling is set to false for stellar.js Disable horizontal scroll on parallax

I honestly can't think of any reason why and this issue is only on android. http://bit.ly/1v0jVlh

将iScroll与Stellar.js结合使用时,它具有css .mobile #wrapper,如果您希望使其在android上正常工作,则必须删除绝对位置。

Use this css in your sheet (for mobile), it will disable the horizontal scrolling but would allow vertical scrolling.

body{
    postion: relative;
    width: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
    }
html{
       overflow-x: hidden;
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM