<i class="background"></i>
<h2>Pure <strong>CSS motion blur</strong> using only one element</h2>
<div class="ball-container">
	<!-- blurred element -->
 	<div class="ball mb"></div>
</div>
//FONT IMPORT
@import url(https://fonts.googleapis.com/css?family=Raleway:400,900);

body {
  font-family: 'Raleway', sans-serif;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

h2 {
  position: relative;
  text-align: center;
  z-index: 3;
  color: #ffffff;
  margin-top: 120px;
  font-size: 21px;
  padding: 0 10%;
}

strong {
  font-weight: 900;
}

.ball-container {
  width: 342px;
  margin: 0 auto; 
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -171px;
}


.ball {
  width: 42px;
  height: 42px;
  background-color: #ffffff;
  position: absolute;
  border-radius: 100%;
  top: 50%;
  margin-top: -21px;
  
  &.mb {
    animation: motion-blur 4s ease-in-out infinite;
  }
}

@keyframes motion-blur {
  0%
  {
    left: 0;
    box-shadow: 0 0 0 rgba(255,255,255,0);
  }
  5%
  {
    left: 0;
    transform-origin: 0 0;
    transform: scaleX(0.85);
  }
  25%
  {
    box-shadow: -20px 0 15px -10px rgba(255,255,255,0.4);
    transform: scaleX(1.05) skewX(-3deg);
  }
  50%
  {
    left: 300px;
    box-shadow: 0 0 0 rgba(255,255,255,0);
    transform: scaleX(1) skewX(0deg);
  }
  55%
  {
    left: 300px;
    transform-origin: 100% 0;
    transform: scaleX(0.9);
  }
  75%
  {
    box-shadow: 20px 0 15px -10px rgba(255,255,255, 0.4);
    transform: scaleX(1.05) skewX(3deg);
  }
	100%
  {
    left: 0px;
    box-shadow: 0 0 0 rgba(255,255,255,0);
    transform: scaleX(1) skewX(0deg);
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.