css 实现飞入效果
@keyframes flyInLeft { from{ opacity: 0; transform: translateX(-60%); } to{ opacity: 1; transform: translateX(0); } }
.class { animation: flyInLeft 1s linear; }
如果想要动画一直执行
animation: flyLeft 10s infinite linear;
加上infinite
@keyframes flyInLeft { from{ opacity: 0; transform: translateX(-60%); } to{ opacity: 1; transform: translateX(0); } }
.class { animation: flyInLeft 1s linear; }
如果想要动画一直执行
animation: flyLeft 10s infinite linear;
加上infinite