首页 > Web开发 > 详细

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

时间:2016-01-21 06:38:05      阅读:328      评论:0      收藏:0      [点我收藏+]
实现的图像动画效果大致是这样的:云彩向左滚动!
技术分享 
【代码效果】

复制代码
代码如下:

<!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>

【用到的素材】
技术分享

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

原文:http://www.jb51.net/css/163930.html

(1)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!