admin管理员组

文章数量:1430377

Does anyone know how to change the type of animation the page/sections uses? I read the docs but couldn't understand a single thing. I like the framework and I really want to give it a try but there is absolutely NO tutorials or documentation for that matter.

Does anyone know how to change the type of animation the page/sections uses? I read the docs but couldn't understand a single thing. I like the framework and I really want to give it a try but there is absolutely NO tutorials or documentation for that matter.

Share Improve this question asked Jul 12, 2011 at 5:01 ZeakeZeake 111 silver badge3 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

You can use those Zepto animations, which are native webkit transitions:

$('.pages').anim({ translateX: window.innerWidth + 'px'}, 0.5, 'ease-out');

or

$('.pages').anim({ translate3d: window.innerWidth + 'px, 0, 0'}, 0.5, 'ease-out');

List of animation available:

var supportedTransforms = [
        'scale', 'scaleX', 'scaleY',
        'translate', 'translateX', 'translateY', 'translate3d',
        'skew',      'skewX',      'skewY',
        'rotate',    'rotateX',    'rotateY',    'rotateZ',    'rotate3d',
        'matrix'
      ];

本文标签: javascriptzeptojs page animationsStack Overflow