开发者

AppStore's screenshot gallery in html?

I'm trying to do the screenshot gallery of an app from the AppStore but in a web app in html.

I've actually get it but the problem is that it scrolls REALLY开发者_C百科 slow.

To do the touch/swipe functions I've used the code from here:

http://quirksmode.org/m/tests/scrollayer.html

In the example, the div's are scrolled smoothly but not in my site with my div's...

Does anyone know what can be happening? Does anyone know a proper way to do it?

This is my (under-developement) site:

http://www.actec.cat/iphone/#projectes_pre

I'm testing it in an iPhone 4.

Thanks.


I finally solved using webkit transforms (translate3d) instead of using javascript.

The problem was that javascript was taking care of moving the object.

For example, I was using:

testElement.style.marginLeft="newposition px";

That was painfully slow in iOS devices.

Now I use:

testElement.style.webkitTransform='translate3d("newposition px",0,0);

And it works as smooth as it should.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜