cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Looking for quick-add? Try the external resource search, it's quicker and gives you access to the most recent version of thousands of libraries. ☝️

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

            
              link(href='https://fonts.googleapis.com/css?family=Lato', rel='stylesheet', type='text/css')
h1 Animated bars
h2 CSS (SASS) ONLY

- var n = 0

.bars
  while n<50
    .bar
    - n++

a(href="http://arthcamara.com/blog",target="blank") Read more about it here
            
          
!
            
              // Importing bourbon to make things easy: http://bourbon.io/
@import "bourbon"

// Useful mixins
@mixin border-radius($radius: 4px)
  @include prefixer(border-radius, $radius, webkit moz spec)
    
/* General styles */

body
  background-color: white
  font-family: 'Lato', Arial, sans-serif
  text-align: center
  padding-top: 30px
  
h1
  font-size: 1.5em
  color: #666
  
h2, a
  font-size: 0.8em
  color: #999
  
.bars
  height: 60px
  margin: 60px auto
  
/* ============================ */
/* VARIABLES                    */
/* ============================ */
  
$bar-width: 4px
$bar-height: 60px
$bar-height-min: 10px
$bar-color: #E04F4F
$bar-radius: 2px
$number-bars: 50

/* ============================ */
/* ANIMATION                    */
/* ============================ */

@include keyframes(bounce-middle)
  0%
    height: $bar-height-min
    margin-top: $bar-height / 2 - $bar-height-min/2
    margin-bottom: $bar-height / 2 - $bar-height-min/2
  30%
    height: $bar-height
    margin-top: 0px
    margin-bottom: 0px
  60%
    height: $bar-height-min
    margin-top: $bar-height / 2 - $bar-height-min/2
    margin-bottom: $bar-height / 2 - $bar-height-min/2
    
@mixin bounce-middle($dur: 0.5s, $delay: 0s)
  @include prefixer(animation, bounce-middle $dur ease $delay infinite, webkit spec)

/* ============================ */
/* BARS                         */
/* ============================ */

.bars
  width: ($bar-width + 2px) * $number-bars
  height: ($bar-height + 2px)
  position: relative
  
  
.bar
  @include border-radius($bar-radius)
  width: $bar-width
  background-color: $bar-color
  display: block
  float: left
  margin: 1px
  height: $bar-height-min
  margin-top: $bar-height / 2 - $bar-height-min/2
  margin-bottom: $bar-height / 2 - $bar-height-min/2
  /* Color and animate each */
  @for $i from 1 through $number-bars
    &:nth-child(#{$i})
      /* Animation */
      @include bounce-middle(2.5s, ($i/100) * 1s)
      /* Color */
      background-color: adjust-hue( $bar-color, $i * 0.5%)
  

            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.
Loading ..................

Console