Animate transform only one property (scale) override other (translate)

后端 未结 2 819
时光取名叫无心
时光取名叫无心 2020-12-17 03:53

The problem is that the transform property\'s value has multiple part like translate, scale etc.

This is a theoretical questio

2条回答
  •  执念已碎
    2020-12-17 04:34

    You can delete the translate(100px, 300px); in .loading:after, then set the translate(100px, 300px) in @keyframes, like follows:

    @keyframes bounce {
      0%,
      100% {
        transform: scale(0)translate(100px, 300px);
        -webkit-transform: scale(0)translate(100px, 300px);
      }
      50% {
        transform: scale(1)translate(100px, 300px);
        ;
        -webkit-transform: scale(1)translate(100px, 300px);
      }
    }
    

提交回复
热议问题