用CSS实现一个背景色为红色,半径为200px的圆,并设置不停的上下移动动画
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
#circle{
/*半径200*/
width: 400px;
height: 400px;
border-radius: 50%;
background-color: palevioletred;
margin: 0 auto;
margin-top: 200px;
/*调用动画*/
animation: move 3s linear infinite;
}
/*上下移动动画*/
@-webkit-keyframes move{
from{
transform: translateY(-100px);
}
to{
transform: translateY(100px);
}
}
</style>
</head>
<body>
<div id="circle">
</div>
</body>
</html>