CSS3-animation 太极动画

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>2-5</title>
<style type="text/css">
body{
overflow: hidden;
}
div {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
box-sizing: border-box;
width: 400px;
height: 400px;
margin: auto;
border: 1px solid red;
border-bottom: 200px solid red;
border-radius: 50%;
transform-origin: 50% 50%;
animation-name: rotate;
animation-duration: 5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
div::after{
content: "";
width: 40px;
height: 40px;
border-radius: 50%;
border:80px solid red;
position: absolute;
background-color: white;
left: 0;
top: 50%;
}
div::before{
content: "";
width: 40px;
height: 40px;
border-radius: 50%;
border:80px solid white;
position: absolute;
background-color: red;
right: 0;
top: 50%;
}
@keyframes rotate{
from{transform: rotate(0deg);}
to{transform: rotate(360deg);}
}
</style>
</head>
<body>
<div></div>
</body>
</html>

posted on 2018-06-30 16:04  想养猫的通信狗  阅读(323)  评论(0编辑  收藏  举报