jQuery ScrollTo缓解 [英] Jquery ScrollTo Easing

查看:81
本文介绍了jQuery ScrollTo缓解的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

不能对Jquery ScrollTo应用缓动方法:

Can´t apply an easing method to Jquery ScrollTo:

$("#scroller").scrollTo(target,1000,{axis:'x',easing:'linear'});

这并不能缓解任何... 我现在开始使用jquery(长期使用原型),所以这肯定是我的错误. 我是否需要一个易用的插件来实现这一目标?这个插件的缓动选项是什么(如果有)?文档尚不清楚. 谢谢.

This doesn´t ease anything... Im starting to use jquery now (been using prototype for long) so this is surely my mistake. Do I need an easing plugin to achieve this? What are the easing option for this plugin (if any)? The documentation is not clear about this. Thanks.

推荐答案

来自jQuery:

jQuery库中唯一的缓动实现是默认的实现,称为swing,而以恒定速度进行发展的实现称为线性.

The only easing implementations in the jQuery library are the default, called swing, and one that progresses at a constant pace, called linear.

因此,easing: 'linear'不应该显示任何内容. 尝试easing: 'swing'.

So easing: 'linear' is not supposed to show anything. Try easing: 'swing'.

这篇关于jQuery ScrollTo缓解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆