Mike Marcacci
Mike Marcacci

Reputation: 1961

Parts of page are invisible when scrolling on Safari 7 with position:fixed elements

There's a pretty big bug in Safari 7 on both Mac and iOS that's hard to find anything on, but is pretty easy to fix.

In some situations when using position:fixed, Safari 7 fails to draw part of the page when scrolling. This can be seen at http://ruelculture.com/glitchy.html by clicking on the arrow, waiting a bit and trying to scroll back up.

Upvotes: 9

Views: 3379

Answers (2)

Jason Lydon
Jason Lydon

Reputation: 7180

There is also position:-webkit-sticky;, which is made specifically for this problem. I've had mixed results with my answer and @Mike Marcacci's solution (flickering, elements disappearing when you reach the bottom of the page). I'm still trying to find the perfect solution to this problem. HTML5 Rocks =>

Upvotes: 0

Mike Marcacci
Mike Marcacci

Reputation: 1961

To fix this, force hardware acceleration on the disappearing element by adding the following CSS hack:

-webkit-transform: translate3d(0, 0, 0);

See it in the wild at http://ruelculture.com/. That's it!

Upvotes: 14

Related Questions