css3 rotate transition, doesn't take shortest way

前端 未结 3 1389
粉色の甜心
粉色の甜心 2021-02-15 12:47

I want to use a css3 transition to smooth a compass movement using phonegap. i calculate the desired rotation as angle from 0 to 359.

The problem is, when it should go f

3条回答
  •  说谎
    说谎 (楼主)
    2021-02-15 13:42

    See if you can use negative numbers. Going from -1deg to 0deg is clockwise, going from 359deg to 0deg is counter clockwise.

提交回复
热议问题