Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用百分比表示的endValue_Javascript_Smartface.io - Fatal编程技术网

Javascript 使用百分比表示的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

我可以使用endValue作为百分比吗

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
    }
});

您在哪里使用该值?