/Animated ripple using simple css
ripple

Animated ripple using simple css

How to make a animated ripple using simple css
/**
@author : Shubham Maurya,
Email id : maurya.shubham5@gmail.com
**/

Hi all , Welcome to shubhammaurya.com , Today we are going to discuss ,
How to make a animated ripple using simple css

In this,we are going to use html and css(with animations)

 LET START

Animated ripple using simple css

So, To start first make a file in notepad and save it as index.html and paste the below code.

<!DOCTYPE html>
<html>
<head>
	<title>Ripple effect</title>
  <link rel="stylesheet" type="text/css" href="ripple.css">
</head>
<body>
<div id="a">
  <div class="circle-ripple"></div>
</div>
</body>
</html>

Now, make a file in notepad and save it as ripple.css and paste the below code.

html, body {
  height: 100%;
}

body {
  background-color: #4e4e4e;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}

#a {
  -webkit-animation: wait 0s alternate infinite;
          animation: wait 0s alternate infinite;
}

.circle-ripple {
  background-color: #35ffc3;
  width: 1em;
  height: 1em;
  border-radius: 50%;
  -webkit-animation: ripple 0.7s linear infinite;
          animation: ripple 0.7s linear infinite;
}

@-webkit-keyframes wait {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes wait {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0;
  }
  40% {
    opacity: 0;
  }
  60% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
@-webkit-keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(101, 255, 120, 0.3), 0 0 0 1em rgba(101, 255, 120, 0.3), 0 0 0 3em rgba(101, 255, 120, 0.3), 0 0 0 5em rgba(101, 255, 120, 0.3);
  }
  100% {
    box-shadow: 0 0 0 1em rgba(101, 255, 120, 0.3), 0 0 0 3em rgba(101, 255, 120, 0.3), 0 0 0 5em rgba(101, 255, 120, 0.3), 0 0 0 8em rgba(101, 255, 120, 0);
  }
}
@keyframes ripple {
  0% {
    box-shadow: 0 0 0 0 rgba(101, 255, 120, 0.3), 0 0 0 1em rgba(101, 255, 120, 0.3), 0 0 0 3em rgba(101, 255, 120, 0.3), 0 0 0 5em rgba(101, 255, 120, 0.3);
  }
  100% {
    box-shadow: 0 0 0 1em rgba(101, 255, 120, 0.3), 0 0 0 3em rgba(101, 255, 120, 0.3), 0 0 0 5em rgba(101, 255, 120, 0.3), 0 0 0 8em rgba(101, 255, 120, 0);
  }
}

Comment Below, If any problem occurs.

STAY CONNECTED FOR MORE

Hi , My Name is Shubham Maurya and i am currently working as a Project Manager.