动画
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <style type="text/css"> *{ margin: 0 auto; padding: 0; } div{ width: 100px; height: 120px; /*border: 1px solid red;*/ animation: aa 10s infinite ease; } @keyframes aa{ 0%{ background-color: red;margin-left: 0px;margin-top: 0px;} 25%{background-color: blue;margin-left: 600px;margin-top: 0px;border-radius: 50%;} 50%{background-color: gold;margin-left: 600px;margin-top: 200px;border-radius: 20%;} 75%{background-color: cyan;margin-left: 0px;margin-top: 200px;border-radius: 10%;} 100%{background-color: tomato;margin-left: 0px;margin-top: 0px;} } </style> </head> <body> <div id=""> </div> </body> </html>