Using SVG to animate and flip a hexagon

后端 未结 3 2009
抹茶落季
抹茶落季 2021-01-25 18:33

I have never really used SVGs but reading some tutorials about it now and tested some stuff. I am learning how to make shapes like a hexagon but now need to make it flip down on

3条回答
  •  鱼传尺愫
    2021-01-25 19:08

    You can use Snap, as you have tagged the question with that..

    Snap('#test').animate({ transform: 't0,260s2,-2'},2000, mina.bounce)
    

    translate 't' as well as scale 's' as the bottom line would automatically drift change whilst scaling up (or you could scale from the center).

    jsfiddle

提交回复
热议问题