Skip to content

Instantly share code, notes, and snippets.

@ipsips
Last active November 4, 2015 11:50
Show Gist options
  • Select an option

  • Save ipsips/5a4790862b9c8fc6c997 to your computer and use it in GitHub Desktop.

Select an option

Save ipsips/5a4790862b9c8fc6c997 to your computer and use it in GitHub Desktop.
/* animation loop duration: 1.5 secs */
.eq {
animation: eqBarJump 1.5s linear infinite;
transform-origin: bottom;
}
/* each bar follows the same keyframe animation but with a different delay */
.eq b:nth-child(1) { animation-delay: -1.3s; } /* bar 1 */
.eq b:nth-child(2) { animation-delay: -1.1s; } /* bar 2 */
.eq b:nth-child(3) { animation-delay: -0.8s; } /* bar 3 */
.eq b:nth-child(4) { animation-delay: -0.6s; } /* bar 4 */
.eq b:nth-child(5) { animation-delay: -0.2s; } /* bar 5 */
.eq b:nth-child(6) { animation-delay: 0s; } /* bar 6 */
/* the keyframes with scale transformations */
@keyframes eqBarJump {
0% { transform: scaleY(.3); }
25% { transform: scaleY(.7); }
50% { transform: scaleY(.4); }
75% { transform: scaleY(1); }
100% { transform: scaleY(.3); }
}
/* bar size in feed */
#feed .eq b {
width: 4px;
height: 50px;
margin-right: 2px;
}
/* bar size in the player tab */
#tab .eq b {
width: 2px;
height: 20px;
margin-right: 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment