How to fix slow scrolling when using webkit-transform and relative positioning on the iphone

Posted by BeWarned on Stack Overflow See other posts from Stack Overflow or by BeWarned
Published on 2010-03-13T15:02:18Z Indexed on 2010/03/13 15:05 UTC
Read the original article Hit count: 357

Filed under:
|
|
|

I have implemented scrolling of a div by using relative positioning and webkit animation for the iphone, it works beautifully on desktop safari but is choppy on the actual iphone (fine on the simulator).

The scrolling works by having a div nested and clipped (overflow:hidden) by its parent. I then set the top position and animate it with -webkit style declarations. The iphone seems to noticeably slow down when there are a lot of items in the inner div.

Any ideas how make the scrolling smoother?

This was a problem with iScroll code and my own hand coded stuff.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about JavaScript