Is there a fluent transition possibility for animation font-size in Raphael JS?

前端 未结 4 1173
广开言路
广开言路 2021-02-09 16:25

So far it seems like it is not fluent, but choppy. E.g. if you have one state attribute with font-size: 14 and want to animate to state with font-size: 16, the

4条回答
  •  南方客
    南方客 (楼主)
    2021-02-09 16:38

    I think scaling the path up would be easier and smoother, like:

    text.hover(function() {
        text.animate({transform: "s1.5 1.5 "}, 400);
    }, function() {
        text.animate({transform: "s1.0 1.0 "}, 400);
    });
    

    See http://jsfiddle.net/SeeG2/40/ for details.

提交回复
热议问题