atom animation css
HTML
<div class="atom">
<div class="electron"></div>
<div class="electron"></div>
<div class="electron"></div>
<div class="electron"></div>
<div class="electron"></div>
</div>
CSS
* {
margin: 0;
padding:0;
}
.atom {
position: relative;
width: 200px;
height: 200px;
background: -webkit-radial-gradient(center, ellipse cover, #000000 0%, #000000 5%, #ffffff 5%, #ffffff 5%, #ffffff 10%, #ffffff 100%);
border-radius: 100px;
padding: 0 10px 10px 0;
}
.electron {
position: absolute;
width: 200px;
height: 200px;
background: transparent;
border-radius: 150px;
border: 5px solid skyblue;
box-shadow: 0 0 0 5px white inset, 0 0 0 5px white;
animation: electron1 1s linear infinite;
transform: rotateY(60deg) rotateX(-60deg) rotate(0);
line-height: 200px;
text-align: center;
font-size: 50px;
color: black;
}
.electron:before {
content:"";
display:block;
position: absolute;
width: 10px;
height: 10px;
border-radius: 5px;
background: black;
top: -7.5px;
left: 100px;
}
.electron:nth-of-type(2) {
transform: rotateY(-60deg) rotateX(-60deg) rotate(0);
animation: electron2 1s linear infinite;
}
.electron:nth-of-type(3) {
transform: rotateY(75deg) rotateX(0) rotate(180deg);
animation: electron3 1s linear infinite;
}
@-webkit-keyframes electron1 {
from {
transform: rotateY(60deg) rotateX(-60deg) rotate(0);
}
to {
transform: rotateY(60deg) rotateX(-60deg) rotate(360deg);
}
}
@-webkit-keyframes electron2 {
from {
transform: rotateY(-60deg) rotateX(-60deg) rotate(0);
}
to {
transform: rotateY(-60deg) rotateX(-60deg) rotate(360deg);
}
}
@-webkit-keyframes electron3 {
from {
transform: rotateY(75deg) rotateX(0) rotate(180deg);
}
to {
transform: rotateY(75deg) rotateX(0) rotate(540deg);
}
}