#ui
  .infinite
    - for (var i = 1; i <= 200; i++)
      .infinite_ball
        .inner
View Compiled
$ballSize: 20px;
$ballCount: 200;

body {
  background: #eef;
  height: 100vh;
  overflow: hidden;
}
#ui {
  .infinite {
    position: absolute;
    top: 50%;
    left: 50%;
    
    &_ball {
      position: absolute;
      top: 0;
      left: 0;
      width: $ballSize;
      height: $ballSize;
      transform: translate(-50%, -50%);
      
      @for $i from 1 through $ballCount {
        &:nth-child(#{$i}) {
          margin-left: #{random(600) - 300}px;
          animation: horizontal 1000ms infinite alternate cubic-bezier(0.545, 0.080, 0.520, 0.975) #{$i * 10}ms;
          
          .inner {
            width: $ballSize;
            height: $ballSize;
            margin-top: #{random(600) - 300}px;
            transform: scale(#{random(10) / 10 + 0.2});
            animation: vertical #{random(4000) + 4000}ms infinite alternate cubic-bezier(0.545, 0.080, 0.520, 0.975) #{$i * 10}ms;
            background: rgba(random(255), random(255), random(255), 0.2);
            border-radius: 999px;
          }
        }
      }
    }
  }
}

@keyframes horizontal {
  0% {
    margin-left: -150px;
  }
  100% {
    margin-left: 150px;
  }
}

@keyframes vertical {
  0% {
    margin-top: -150px;
  }
  100% {
    margin-top: 150px;
  }
}

@keyframes scale {
  0% {
    transorm: translate(-50%, -50%) scale(0.5);
  }
  100% {
    transorm: translate(-50%, -50%) scale(1.5);
  }
}
View Compiled

External CSS

  1. https://fonts.googleapis.com/css?family=Dosis:800

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js
  2. https://cdnjs.cloudflare.com/ajax/libs/velocity/1.5.0/velocity.min.js