最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - zepto.js page animations - Stack Overflow

programmeradmin1浏览0评论

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'
      ];
发布评论

评论列表(0)

  1. 暂无评论