Velocity.js - 如何使用具有 UI 效果的序列?
Velocity.js - How to use sequences with UI effects?
目前我正在尝试,但没有成功。
我们可以有这样的东西:
function _nextStepTransition(elementOut, elementIn) {
var goForward = [
{ e: elementOut, p: { translateX: 100 }, o: { duration: 1000 } },
{ e: elementIn, p: { translateX: 200 }, o: { duration: 1000 } }
];
$.Velocity.RunSequence(goForward);
}
据我了解,p代表属性。好的
有谁知道我们是否可以通过p:
属性,UI效果transition.slideDownBigIn
,这样我们可以有一系列 UI 效果吗?
我对此处应用的语法一无所知(如果可能的话),到目前为止我的尝试没有任何结果。
当然可以。只需将 p
中的 Object
替换为您想要制作的 transition/callout 中的 string
,如:
var goForward = [
{ e: elementOut, p: 'callout.pulse', o: { duration: 1000 } },
{ e: elementIn, p: 'transition.flipXIn', o: { duration: 1000 } }
];
看到 example here。
目前我正在尝试,但没有成功。
我们可以有这样的东西:
function _nextStepTransition(elementOut, elementIn) {
var goForward = [
{ e: elementOut, p: { translateX: 100 }, o: { duration: 1000 } },
{ e: elementIn, p: { translateX: 200 }, o: { duration: 1000 } }
];
$.Velocity.RunSequence(goForward);
}
据我了解,p代表属性。好的
有谁知道我们是否可以通过p:
属性,UI效果transition.slideDownBigIn
,这样我们可以有一系列 UI 效果吗?
我对此处应用的语法一无所知(如果可能的话),到目前为止我的尝试没有任何结果。
当然可以。只需将 p
中的 Object
替换为您想要制作的 transition/callout 中的 string
,如:
var goForward = [
{ e: elementOut, p: 'callout.pulse', o: { duration: 1000 } },
{ e: elementIn, p: 'transition.flipXIn', o: { duration: 1000 } }
];
看到 example here。