CSS3: Yin-Yang Fish
Yin-Yang Fish, Chinese Bagua.
Wood-Fire-Metal-Water-Earth! The 5 fundamental elements running circle balance in a human body.
<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; }
}
@-moz-keyframes r {
from { transform: rotate(0deg); }
to { transform: rotate(-360deg); }
}
@-moz-keyframes c1 {
from { background-color: #333; }
50% { background-color: #c30; }
to { background-color: #333; }
}
@-moz-keyframes c2 {
from { background-color: #c30; }
50% { background-color: #333; }
to { background-color: #c30; }
}
@-o-keyframes r {
from { transform: rotate(0deg); }
to { transform: rotate(-360deg); }
}
@-o-keyframes c1 {
from { background-color: #333; }
50% { background-color: #c30; }
to { background-color: #333; }
}
@-o-keyframes c2 {
from { background-color: #c30; }
50% { background-color: #333; }
to { background-color: #c30; }
}
@keyframes r {
from { transform: rotate(0deg); }
to { transform: rotate(-360deg); }
}
@keyframes c1 {
from { background-color: #333; }
50% { background-color: #c30; }
to { background-color: #333; }
}
@keyframes c2 {
from { background-color: #c30; }
50% { background-color: #333; }
to { background-color: #c30; }
}
.yinyang {
width:640px; height: 640px;
overflow: hidden;
margin: 64px auto;
}
.yinyang, #svgelem {
animation-name: r;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-name: r;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
animation-name: r;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: linear;
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;
border-radius: 320px 0 0 320px;
}
.yin, .yinc, .yangd {
animation-name: c1;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
animation-name: c1;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
animation-name: c1;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
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;
animation-name: c2;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
animation-name: c2;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in;
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: 100%;
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%;
}