<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>太极图</title>
<style>
body, ul, li{
margin: 0; padding: 0;
padding-top: 50px;
}
.mask{
width: 300px;
height: 300px;
margin: 0 auto;
border-radius: 100%;
border: 2px solid #000;
position: relative;
transition:background-color .5s ease-in;
animation: rotate 15s linear infinite;
}
.mask:hover{
animation-play-state: paused;
}
.mask div{
position: absolute;
}
.mask .left{
width:150px; height: 300px;
background-color: #000;
left: 0px;
top: 0px;
border-radius: 300px 0 0 300px / 300px 0 0 300px;
}
.mask .right{
width:150px; height: 300px;
background-color: #FFF;
right: 0px;
top: 0px;
border-radius: 0 300px 300px 0 / 0 300px 300px 0;
}
.mask .top{
width: 150px; height: 150px;
background-color: #FFF;
border: 50px solid #000;
box-sizing: border-box;
position: absolute;
border-radius: 100%;
top: 0px;
left: 75px;
}
.mask .bottom{
width: 150px; height: 150px;
background-color: #000;
border: 50px solid #FFF;
box-sizing: border-box;
position: absolute;
border-radius: 100%;
bottom: 0px;
left: 75px;
}
@keyframes rotate {
10%{
transform: rotate(36deg);
}
20%{
transform: rotate(72deg);
}
30%{
transform: rotate(108deg);
}
40%{
transform: rotate(144deg);
}
50%{
transform: rotate(180deg);
}
60%{
transform: rotate(216deg);
}
70%{
transform: rotate(252deg);
}
80%{
transform: rotate(288deg);
}
90%{
transform: rotate(324deg);
}
100%{
transform: rotate(360deg);
}
}
</style>
</head>
<body>
<div class="mask">
<div class="left"></div>
<div class="right"></div>
<div class="top"></div>
<div class="bottom"></div>
</div>
</body>
</html>
相关推荐
© 2020 asciim码
人生就是一场修行