#battery{
    position: relative;
    width: 102px;
    height: 50px;
    border: 5px solid;
    border-radius: 10% / 20%;
    font-size: 0px;
}
#battery::after, #battery::before{
    content: "";
    position: absolute;
    background-color: black;
}
#battery::after{
    height: 20px;
    width: 10px;
    left: 102px;
    bottom: 16px;
    border-radius: 0% 50% 50% 0%;
}
.block {
    width: 34px;
    height: 51px;
    background-color: green;
    display: inline-block;
    position: relative;
    animation: appear 1.5s linear infinite;
    z-index: 1;
}
#battery > .block:last-child{
    animation-delay: 0.75s;
}
#battery > .block:nth-child(2) {
    animation-delay: 0.25s;
}
@keyframes appear {
    0% {opacity: 0;}
    30% {opacity: 1;}
    100% {opacity: 0;}
}