有没有可能对此进行放松:
('#sideBar').hide('slide', {direction: 'right' },
800, function(){...});目前它正在移动,非常颤动,也许..100 - 500像素(取决于内容)。我一直在看谷歌,大多数人都说要使用easing,但当我查看文档时,我看不到easing的属性。
发布于 2013-05-10 18:28:34
您可以在options对象(第二个参数)中指定easing属性:
$('#sideBar').hide('slide', { direction: 'right', easing: 'easeOutBounce' },
800, function(){...});Check out the easing documentation
Here's an example
发布于 2013-05-10 18:23:46
第一个更正为
jQUery('#sideBar').hide('slide', {direction: 'right' },
800, function(){...});http://docs.jquery.com/UI/Effects/Slide
请看下面的页面
http://docs.jquery.com/UI/Effects/Slide
或
您可以使用animate
http://api.jquery.com/animate/
你也可以找到easing cheat
例如。
http://gsgd.co.uk/sandbox/jquery/easing/
http://jqueryui.com/resources/demos/effect/easing.html
http://easings.net/
发布于 2013-05-10 18:33:51
您可以从http://gsgd.co.uk/sandbox/jquery/easing下载jQuery easing插件,该插件提供的动画比JQuery附带的默认动画更平滑。然后,您可以使用以下代码轻松设置全局缓动动画:
jQuery.easing.def = "easeInOutExpo";当然,您可以选择您喜欢的任何缓动动画。这将影响页面上的所有jQuery动画,如果您正在寻找一致性,这并不是一件坏事。
https://stackoverflow.com/questions/16480004
复制相似问题