码迷,mamicode.com
首页 > Web开发 > 详细

CSS3效果:“W”形运行轨迹

时间:2017-01-24 20:12:06      阅读:286      评论:0      收藏:0      [点我收藏+]

标签:nim   animation   doc   tle   doctype   运行   ase   dia   font   

<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding:0;
}
#div{
width:900px;
height:400px;
border:2px solid black;
margin: 100px auto;
}
#span{
float:left;
display: block;
font-size: 100px;
width: 100px;
height: 100px;
line-height: 80px;
text-align: center;
border-radius: 50%;
background: radial-gradient(blue,green);
animation: move 4s ease 0s infinite alternate;
}
@keyframes move {
0%{
transform: translate(0px,0px);
}
25%{
transform: translate(200px,300px);
}
50%{
transform: translate(400px,0px);
}
75%{
transform: translate(600px,300px);
}
100%{
transform: translate(800px,0px);
}
}

</style>
</head>
<body>
<div id="div">
<span id="span">w</span>
</div>
</body>
</html>

CSS3效果:“W”形运行轨迹

标签:nim   animation   doc   tle   doctype   运行   ase   dia   font   

原文地址:http://www.cnblogs.com/qiancheng123/p/6347674.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!