我正在尝试提高我的 jQuery 技能,因此我编写了一个自己的灯箱。
但有一件事让我发疯。我怎样才能像其他灯箱一样为 div 设置动画。从中间开始,向两边展开。我很无奈。
jQuery提供的特殊缓动属性有可能吗?
$('#clickme').click(function() {
$('#book').animate({
width: 'toggle',
height: 'toggle'
}, {
duration: 5000,
specialEasing: {
width: 'linear',
height: 'easeOutBounce'
},
complete: function() {
$(this).after('<div>Animation complete.</div>');
}
});
});
我希望有一个人可以帮助我 :)