How can I apply multiple transform declarations to one element?

前端 未结 4 499
夕颜
夕颜 2020-12-03 09:49

I have an element with two classes, one called \"rotate\" that will rotate the element 360 degrees and another called \"doublesize\" that will scale the element 2x its nor

4条回答
  •  Happy的楠姐
    2020-12-03 10:08

    You can surely combine multiple animation, but not by combining CSS classes. See the first answer here : combining multiple css animations into one overall animation

    The first part tells you how to combine animation with CSS with some parameters (delay, duration) :

    .outside.animate {
       -webkit-animation-delay: 0s, .5s, .5s;
       -webkit-animation-duration: 500ms, 1000ms, 1000ms;
       -webkit-animation-name: button-bounce, rotate, skyblue;
    }
    

    For sure, you firstly need to define your animations.

提交回复
热议问题