当前位置: 移动技术网 > IT编程>网页制作>CSS > CSS3动画animation实现云彩向左滚动

CSS3动画animation实现云彩向左滚动

2019年07月25日  | 移动技术网IT编程  | 我要评论
实现的图像动画效果大致是这样的:云彩向左滚动!
 
【代码效果】

复制代码
代码如下:

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>css3动画animation实现漂浮的云</title>
<style type="text/css">
html,body {
padding: 0;
margin: 0;
}
.wrap {
height: 190px;
width: 600px;
margin: 150px auto 0;
background: url('bg-clouds.png');
-webkit-animation:cloud 40s linear infinite;
-o-animation:cloud 40s linear infinite;
}
@-webkit-keyframes cloud {
from{background-position:0% 0%}
to{background-position:50% 50%}
}
</style>
</head>
<body>
<div class="wrap"></div>
</body>
</html>

【用到的素材】

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网