87,993
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>new_file</title>
</head>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
@keyframes aroundLine{
0%{left:0px;}
45%{left: 100%;}
}
div{
position: relative;
height: 50px;
width: 50px;
left: 0;
top: 0;
border-radius: 25px;
background-color: aquamarine;
animation: aroundLine 5s infinite;
}
</style>
<body>
<div></div>
<hr />
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
@-webkit-keyframes move{
0%{
transform:translate(0,0);
}
100%{
transform:translate(200px,0);
}
}
div{
background-color: #ff0000;
width: 20px;
height: 20px;
border-radius: 50%;
animation:move 2s linear 0s infinite alternate;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
<style>
#a{width:20px;height:20px;background:#f60;border-radius:20px;-webkit-animation:gogogo 2s infinite alternate linear;}
@-webkit-keyframes gogogo {
0%{
-webkit-transform:translateX(0);
}
100%{
-webkit-transform:translateX(100px);
}
}
</style>
<div id="a"></div>