开发者

how to replicate JQtouch smooth iphone animations?

开发者 https://www.devze.com 2022-12-20 15:30 出处:网络
so, i know how to do this by theory, buy when i try the animation is really laggy. what i\"m doing: i got this UL with all sort of items and text (really standard) and when i want to animate it

so, i know how to do this by theory, buy when i try the animation is really laggy.

what i"m doing: i got this UL with all sort of items and text (really standard) and when i want to animate it i just add with JS a class "flipout" like so: element.className = "flipout";

the CSS for th开发者_运维百科e animation looks like this:

.flipout{
-webkit-animation-duration: .55s;
-webkit-animation-name: flipout_anim;
-webkit-transform-origin: left;

}

@-webkit-keyframes flipout_anim {
    from {
    -webkit-transform: translateX(0%);
}
to {
    -webkit-transform: translateX(-100%);

}
}

the same HTML moves smooth as silk with JQtouch.. what am i doing wrong?!


the solution: use translate3d(x,y,z); moves smooth.

0

精彩评论

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