蓝天
蓝天
  • 发布:2015-03-10 15:27
  • 更新:2015-03-18 12:04
  • 阅读:1379

图片轮播:我该如何重定义轮播的动画,由linear改为ease-out?

分类:MUI

如题。
我重定义了.mui-slider .mui-slider-group的样式,但不生效,求指点!

.mui-slider .mui-slider-group {
position: relative;
font-size: 0;
white-space: nowrap;
-webkit-transition: all 3s ease-out;
transition: all 3s ease-out;

}

2015-03-10 15:27 负责人:无 分享
已邀请:
蓝天

蓝天 (作者)

都没有人回答呀,只能自己写一个slider了

蓝天

蓝天 (作者)

终于实现ease-out的效果,mui.slider还有很多options,但在官方文档中都没有提及,只能查看代码推算出来。
slider需配置的options如下:
var easing={
//style: 'cubic-bezier(0.1, 0.57, 0.1, 1)'
style:"ease-out",
fn: function(k) {
return Math.sqrt(1 - (--k * k));
}
}
var slider = mui("#slider");
slider.slider({
interval: 5000,
bounce: true,
bounceTime:2000,
bounceEasing:easing
});

该问题目前已经被锁定, 无法添加新回复