SOURCE

console 命令行工具 X clear

                    
>
console
let outer = document.getElementById('outer');

const dt = 6; // ms
const angleVelocity = 0.4; // deg/ms
let   angle = 135;


setInterval(()=>{
  angle += dt*angleVelocity;
  outer.style.backgroundImage =`linear-gradient(${angle}deg,dodgerblue,pink,gold)` ;
},dt);
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <div id="outer">
    <div id="inner">
      
    </div>
  </div>
</body>
</html>
$R_out : 160px;
$R_in  : 130px;

#outer
{
  height: $R_out;
  width: $R_out;
/*   background-image : linear-gradient(135deg,dodgerblue,tomato); */
  border-radius: $R_out/2;
  position: absolute;
  animation: a1 10s ease-in forwards;
  #inner{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    height: $R_in;
    width: $R_in;
    background: white;
    border-radius: $R_in/2;
  }
  

}