button {
  position: relative;
  overflow: hidden;
  -webkit-transition-duration: 0.4s; /* Safari */
  transition-duration: 0.4s;
  border: none;
  outline: none;
}
button:after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 500px;
  margin-left: -250px;
  margin-top: -250px;
  background: rgba(255,255,255,0.8);
  border-radius: 100%;
  opacity: .6;
  transform: scale(0);
}
@keyframes ripple {
  0% {
    transform: scale(0);
  }
  40% {
    background: rgba(255,255,255,0);
    transform: scale(1);
  }
  100% {
    background: rgba(255,255,255,0);
    opacity: 0;
    transform: scale(1);
  }
}
button:not(:active):after {
  animation: ripple 2s ease-out;
}
button:after {
  visibility: hidden;
}
button:focus:after {
  visibility: visible;
}

 
 
 
 p.btn-success.active {
  position: relative;
  overflow: hidden;
  -webkit-transition-duration: 0.4s; /* Safari */
  transition-duration: 0.4s;
  border: none;
  outline: none;
}
p.btn-success.active:after {
  content: '';
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 500px;
  margin-left: -250px;
  margin-top: -250px;
  background: rgba(255,255,255,0.8);
  border-radius: 100%;
  opacity: .6;
  transform: scale(0);
}
@keyframes ripple {
  0% {
    transform: scale(0);
  }
  40% {
    background: rgba(255,255,255,0);
    transform: scale(1);
  }
  100% {
    background: rgba(255,255,255,0);
    opacity: 0;
    transform: scale(1);
  }
}
p.btn-success.active:not(:active):after {
  animation: ripple 2s ease-out;
}
p.btn-success.active:after {
  visibility: hidden;
}
p.btn-success.active:focus:after {
  visibility: visible;
}



