.main
  -(1..400).each do
    .cell
View Compiled
@import "compass/css3";

body{
  width:100%;
  -webkit-transition:-webkit-filter 1s ease-in-out;
 -webkit-filter: grayscale(0.8);
}
body:hover
{
   -webkit-filter:grayscale(0);
}
@for $j from 1 through 400{
.cell:nth-child(#{$j}) {
  position: absolute;
  opacity: 0.5;
  border-radius:100%;
 background-color:rgb(random(255),random(255),random(255));
width:30px;
left:20+(($j - 1) % 23)*35 + px;
top:40*(($j - 1) % 15) + px;
height:30px;
-webkit-transition:transform 2s,opacity 200ms;
-webkit-animation:myrot 5s linear infinite random(10)+s;
border: 0px inset #eee;
/*change the border-styles and sizes for different patterns*/
}
@keyframes myrot
{0%,100%{transform:scale(1)rotate(0deg);}
50%{transform:scale(0)rotate(360deg);}
}
.cell:nth-child(#{$j}):hover{
  opacity:1;
}
}
View Compiled
//HOVER any circle to see the beautiful colors.. colorful background.. adding borders to the circles gives a nice look but it becomes slow and heavy..

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