通过animation的动画效果对图片进行移动

                   通过animation的动画效果对图片进行移动

首先制造一个盒子,给它一个高度和宽度,然后再代入一张图片,样式如下图。
在这里插入图片描述
在这里插入图片描述
给了样式后,再用animation的transform:translate(x,y)对它进行移动,想要多次移动的话,我们可以在@keyframes里添加多个%。
在这里插入图片描述
在这里插入图片描述
animation: big 2s ease infinite; 2s内从慢到快完成这个移动,进行无数次。

猜你喜欢

转载自blog.csdn.net/weixin_44551950/article/details/86666324