CSS Keyframe animations for all browsers?

前端 未结 2 492
被撕碎了的回忆
被撕碎了的回忆 2021-01-21 20:41

I have a swing animation that I would like to work on all (modern) browser. Do I have the correct css?

Also, what are the other browsers equivalent for: -webkit-transfor

2条回答
  •  别那么骄傲
    2021-01-21 21:07

    for animation use can use:

    .animation(@value){
        -webkit-animation: @value;
        -moz-animation:    @value;
        -o-animation:      @value;
        -ms-transition:    @value;
        animation:         @value;
    }
    
    .test{
      .animation(swing 3s infinite ease-in-out);
    }
    
    .test1{
      .animation(~"swing 3s infinite, swing 3s infinite");
    }
    

    for the keyframes in Less, it's kind of strange: How to set keyframes name in LESS

提交回复
热议问题