开发者

AppStore's screenshot gallery in html?

开发者 https://www.devze.com 2023-03-11 12:59 出处:网络
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.

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

精彩评论

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

关注公众号