Unfortunately, Apple released a buggy implementation of
-webkit-overflow-scrolling: touch
. The problem is seems pretty awful at first: if you use the new native scrolling behavior on elements that use or contain children with position:relative
, you may end up with some pretty gnarly rendering areas. This is particularly true for stuff that gets rendered off-screen.
Lucky for us, there is relatively (ahem) painless workaround. If you force Mobile Safari to use hardware acceleration when drawing the positioned elements, the rendering errors disappear. How do you do that? With a little 3D magic, via a no-move translation with this declaration:
-webkit-transform: translate3d(0,0,0)
. Sprinkling this 3D fairy dust on your elements with position:relative
and your rendering issues will vanish.
No comments:
Post a Comment