<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bubble Search Animation</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" />
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="cf_center">
<div class="search">
<div class="bubble"></div>
<div class="bubble"></div>
<div class="bubble"></div>
<i class="fa fa-search"></i>
<br><br>
</div>
</div>
</body>
</html>
*{
padding: 0;
margin: 0;
font-family: sans-serif;
}
body{
background: black;
color: aqua;
}
.cf_center{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.search{
width: 80px;
height: 80px;
background: aqua;
border-radius: 50%;
text-align: center;
}
i{
display: block;
position: absolute;
color: rgb(11, 100, 216);
font-size: 40px;
font-weight: 400;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
opacity: .6;
transition: all .6s;
}
i:hover{
opacity: 1;
}
.bubble{
position: absolute;
width: 80px;
height: 80px;
background: rgb(37, 207, 250);
border-radius: 50%;
animation: searching 3s infinite;
}
.bubble:nth-child(1){
animation-delay: .6s;
}
.bubble:nth-child(2){
animation-delay: 1s;
}
.bubble:nth-child(3){
animation-delay: 1.3s;
}
@keyframes searching {
0%{
transform: scale(1);
filter: opacity(1);
}
98%{
transform: scale(2);
filter: opacity(.2);
}
100%{
transform: scale(2);
filter: opacity(.1);
}
}
//Source Code :- https://github.com/CodingFlames/bubble-searching-animation
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.