<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>变形与动画</title>
<style type="text/css">
@-webkit-keyframes move {
0%{
transform: translate(0);
}
15%{
transform: translate(100px,180px);
}
30%{
transform: translate(150px,0);
}
45%{
transform: translate(250px,180px);
}
60%{
transform:translate(300px,0);
}
75%{
transform: translate(450px,180px);
}
100%{
transform: translate(480px,0);
}
}
div {
width: 500px;
height: 200px;
border: 1px solid red;
margin: 20px auto;
}
div span {
display: inline-block;
width: 20px;
height: 20px;
background: green;
border-radius: 100%;
-webkit-animation-name:move;
-webkit-animation-duration: 10s;
-webkit-animation-timing-function:ease;
-webkit-animation-delay:.1s;
-webkit-animation-iteration-count:infinite;
}
</style>
</head>
<body>
<div><span></span></div>
</body>
</html>