如何使用 Velocity.js 将 slideDown/slideUp 动画与其他属性相结合
How to combine slideDown/slideUp animations with other properties using Velocity.js
我正在使用 Velocity.js 为我网站上的不同内容制作动画。
我可以为我的元素设置 slideDown/slideUp 动画,但我想将它与缩放动画结合起来。
示例:
$('#myelement').velocity({scale: 0});
$('#myelement').velocity('slideUp');
CODEPEN
我真的不知道如何连接这两个动画开始
同时
我在 Velocity.js documentation 中找到了 queue
选项。
You can set queue to false to force a new animation call to immediately run in parallel with any currenty-active animations.
$('#trigger').click(function() {
$('#myelement').velocity({
scale: 0
}, {
queue: false
});
$('#myelement').velocity('slideUp');
});
CODEPEN
我正在使用 Velocity.js 为我网站上的不同内容制作动画。
我可以为我的元素设置 slideDown/slideUp 动画,但我想将它与缩放动画结合起来。
示例:
$('#myelement').velocity({scale: 0});
$('#myelement').velocity('slideUp');
CODEPEN
我真的不知道如何连接这两个动画开始 同时
我在 Velocity.js documentation 中找到了 queue
选项。
You can set queue to false to force a new animation call to immediately run in parallel with any currenty-active animations.
$('#trigger').click(function() {
$('#myelement').velocity({
scale: 0
}, {
queue: false
});
$('#myelement').velocity('slideUp');
});