<div class="container">
<div class="bubble b1"></div>
<div class="bubble b2"></div>
<div class="bubble b3"></div>
<div class="bubble b4"></div>
<div class="bubble b5"></div>
<div class="bubble b6"></div>
<div class="bubble b7"></div>
</div>
body {
margin: 0;
overflow: hidden;
}
.container {
background: #000;
height: 100vh;
width: 100vw;
overflow: hidden;
}
.bubble {
position: absolute;
top: 0;
left: 0;
border: 3px solid #FFA3DD;
border-radius: 50%;
background-color: #FF1EAD;
transition: all 50ms ease-in-out;
animation-name: bubble;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
.bubble::after {
content: "";
position: absolute;
border-top: 2px solid #FF1EAD;
border-right: 0px;
border-bottom: 2px solid #FF1EAD;
border-left: 5px solid #FFF;
border-radius: 50%;
transform: translate(30%,25%);
height: 65%;
width: 40%;
}
.bubble::before {
content: "";
position: absolute;
height: 10%;
width: 10%;
border-radius: 50%;
background-color: white;
z-index: 1;
transform: translate(270%, 80%)
}
.b1 {height: 180px; width: 180px; animation-duration: 6s; left: 2vw}
.b2 {height: 90px; width: 90px; animation-duration: 8s; left: 20vw}
.b3 {height: 120px; width: 120px; animation-duration: 4s; left: 49vw}
.b4 {height: 80px; width: 80px; animation-duration: 10s; left: 61vw}
.b5 {height: 160px; width: 160px; animation-duration: 11s; left: 83vw}
.b6 {height: 50px; width: 50px; animation-duration: 9s; left: 50vw}
.b7 {height: 20px; width: 20px; animation-duration: 9.5s; left: 33vw}
@keyframes bubble {
0% {transform: translate(0vw, 100vh);}
20% {transform: translate(0.9vw, 80vh);}
25% {transform: translate(1vw, 75vh);}
30% {transform: translate(0.9vw 70vh);}
50% {transform: translate(0vw, 50vh);}
70% {transform: translate(-0.9vw,30vh);}
75% {transform: translate(-1vw, 25vh);}
80% {transform: translate(-0.9vw,20vh);}
100% {transform: translate(0vw, 0vh);}
}
.bubble:active {
background-color: transparent;
border: 1px solid #FFF;
transform: scale(20);
}
.bubble:active::before{
visibility: hidden;
}
.bubble:active::after{
visibility: hidden;
}
This Pen doesn't use any external CSS resources.