SOURCE

console 命令行工具 X clear

                    
>
console
var s = 0 // 角度
var r = 230 / 2 // 半径
var $dot = $('.dot')
		
function ani () {
  var t = Math.PI/180 * s
  var x = Math.sin(t) * r
  var y = Math.cos(t) * r
  $dot.css({transform: 'translate(' + x + 'px, ' + y + 'px)'})
  s++
  requestAnimationFrame(ani)
}
ani()
<div class="box">
  <div class="dot"></div>
</div>
body{margin:0;padding:0}
.box{
  position: absolute;
  left: 10px;
  top: 10px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border:1px solid green;
}

.dot {
  width: 10px;
  height: 10px;
  background: red;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -5px 0 0 -5px;
  transform-origin: center;
}

本项目引用的自定义外部资源