YinYang
yin - yang circle
yin - yang circle
<div class="yinyang">
<div class="yinyang">
<div class="yin"><div class="yinc"><div class="yind"></div></div></div>
<div class="yang"><div class="yangc"><div class="yangd"></div></div></div>
</div>
@-webkit- keyframes r {
@-webkit-keyframes r {
from {
transform: rotate(0deg);
}
to {
transform: rotate(-360deg);
}
}
@-webkit-keyframes c1 {
from {
background-color: #333;
}
50% {
background-color: #c30;
}
to {
background-color: #333;
}
}
@-webkit-keyframes c2 {
from {
background-color: #c30;
}
50% {
background-color: #333;
}
to {
background-color: #c30;
}
}
.yinyang {
width:640px; height: 640px;
animation-name: r;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
.yin, .yang {
width: 50%;
height: 100%;
float: left;
position: relative;
}
.yin {
background-color: #333;
border-radius: 320px 0 0 320px;
border-radius: 320px 0 0 320px;
}
.yin, .yinc, .yangd {
animation-name: c1;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
}
.yang, .yangc, .yind {
animation-name: c2;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
}
.yang {
background-color: #c30;
border-radius: 0 320px 320px 0;
border-radius: 0 320px 320px 0;
}
.yinc {
width: 100%;
height: 50%;
background-color: #333;
border-radius: 50%;
border-radius: 50%;
position: absolute;
bottom: 0;
left: 50%;
z-index: 11;
}
.yangc {
width: 100%;
height: 50%;
background-color: #c30;
border-radius: 50%;
border-radius: 50%;
position: absolute;
top: 0;
right: 50%;
z-index: 9;
}
.yind {
width: 25%;
height: 25%;
background-color: #c30;
border-radius: 50%;
border-radius: 50%;
z-index: 10;
position: absolute;
left: 50%;
top: 50%;
margin-left: -12.5%;
margin-top: -12.5%;
}
.yangd {
width: 25%;
height: 25%;
background-color: #333;
border-radius: 50%;
border-radius: 50%;
z-index: 10;
position: absolute;
left: 50%;
top: 50%;
margin-left: -12.5%;
margin-top: -12.5%;
}