<!-- http://www.mangcut.vn/blog/2014-11-26-sonar-effect-with-css.html -->

<div class="sonar-wrapper">
	<div class="sonar-emitter">
    <div class="sonar-wave"></div>
  </div>
</div>
/* Make it looks good on CodePen */
html {
  background-color: #cef;
}
html, body, .sonar-wrapper {
  height: 100%;
}

/* Prevent scrollbars to appear when waves go out of bound */
.sonar-wrapper {
  position: relative;
  z-index: 0;
  overflow: hidden;
}

/* The circle */
.sonar-emitter {
  position: relative;
  margin: 32px auto;
  width: 160px;
  height: 160px;
  border-radius: 9999px;
  background-color: HSL(45,100%,50%);
}

/* the 'wave', same shape and size as its parent */
.sonar-wave {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  background-color: HSL(45,100%,50%);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

/*
  Animate!
  NOTE: add browser prefixes where needed.
*/
.sonar-wave {
  animation: sonarWave 2s linear infinite;
}

@keyframes sonarWave {
  from {
    opacity: 0.4;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}
$(".sonar-wave").on("webkitAnimationIteration oanimationiteration animationiteration", function(){
  $(this).css("background-color", colorize());
})

function colorize() {
  var hue = Math.random() * 360;
  return "HSL(" + hue + ",100%,50%)";
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. //cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js