效果图:小球沿着圆圈进行转动,利用css3的animation特性
代码如下:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
background-color: red;
}
#box{
width: 200px;
height: 200px;
margin: 200px auto;
border-radius: 50%;
border:2px solid white;
position: relative;
animation: run 3s