实现的图像动画效果大致是这样的:云彩向左滚动!
【代码效果】
代码如下:
<!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>
<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>
【用到的素材】
—-想了解更多的linux相关异常处理怎么解决关注<计算机技术网(www.ctvol.com)!!>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/csstutorial/46689.html