到目前为止我正在尝试但没有成功。
我们可以有这样的东西:
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代表属性(property)。好的。
有谁知道我们是否可以将 UI 效果 transition.slideDownBigIn
作为 p:
property 传递,这样我们就可以得到一个序列UI效果?
我对此处应用的语法一无所知(如果可能的话),并且我的尝试到目前为止没有任何结果。
最佳答案
是的,当然。只需将 p
中的 Object
替换为您想要进行的转换/标注的 string
,如下所示:
var goForward = [
{ e: elementOut, p: 'callout.pulse', o: { duration: 1000 } },
{ e: elementIn, p: 'transition.flipXIn', o: { duration: 1000 } }
];
查看example here .
关于javascript - Velocity.js - 如何使用具有 UI 效果的序列?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32383039/