-webkit-overflow-scrolling: touch; breaks in Apple's iOS8

前端 未结 10 1398
刺人心
刺人心 2020-11-30 20:19

I\'m working on a web app that uses -webkit-overflow-scrolling:touch in several places to give the overflown divs inertia scrolling.

Since updating to I

10条回答
  •  旧时难觅i
    2020-11-30 21:01

    I had this problem and found a solution. The solution is that, you have to put your content into two containers for ex:(.dashboardScroll > .dashboardScroll-inner) and give the inner container ".dashboardScroll-inner" 1px more height than the parent ".dashboardScroll" throug this css3 property

    .dashboardScroll-inner { height: calc(100% + 1px);}
    

    check out this :

    http://patrickmuff.ch/blog/2014/10/01/how-we-fixed-the-webkit-overflow-scrolling-touch-bug-on-ios/

    or otherwise if you can't add another container use this:

    .dashboardScroll:after { height: calc(100% + 1px);}
    

提交回复
热议问题