Javascript 使用百分比表示的endValue
我可以使用endValue作为百分比吗Javascript 使用百分比表示的endValue,javascript,smartface.io,Javascript,Smartface.io,我可以使用endValue作为百分比吗 Pages.Page1.ImageButton1.animate({ ... endValue : 30, ... }); endValue的类型是什么?像素那么,我如何使用百分比呢?我尝试了%30或30%,但没有成功。您可以将其用作字符串: Pages.Page1.ImageButton1.animate({ ... endValue : "100%", ... }); 以这段完整的代码为例 Pages.Page1.ImageButton1.anim
Pages.Page1.ImageButton1.animate({
...
endValue : 30,
...
});
endValue的类型是什么?像素那么,我如何使用百分比呢?我尝试了%30或30%,但没有成功。您可以将其用作字符串:
Pages.Page1.ImageButton1.animate({
...
endValue : "100%",
...
});
以这段完整的代码为例
Pages.Page1.ImageButton1.animate({
property : 'Y',
endValue : '30%',
motionEase : SMF.UI.MotionEase.plain,
duration : 3000,
onFinish : function () {
//do your action after finishing the animation
}
});
您在哪里使用该值?