Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

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.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <div class="elem one">
  <span>First Element</span>
</div>
<div class="elem two">
  <span>Second Element</span>
</div>
<div class="elem three">
  <span>Third Element</span>
</div>
<div class="elem four">
  <span>fourth Element</span>
</div>
<div><button type="button" id="btn-action">START</button></div>
              
            
!

CSS

              
                // ******************************
// Normalize (ignore me!)
// ******************************
$bg_color:#333;
$fonts:Arial,"Hiragino Kaku Gothic Pro W3",Meiryo,sans-serif;
$font_color:#fff;
$link_color:#fff;
$link_hover_color:#aaa;

*, *:before, *:after{
  box-sizing:border-box;
  padding:0;
  margin:0;
}
body{
  font-family:$fonts;
  background-color:$bg_color;
  position:relative;
  color: $font_color;
  text-align: center;
  padding:30px 0;
  a, a:visited{
    color: $link_color;
    text-decoration:none;
  }
  a:hover{
    color: $link_hover_color;
  }
}
#btn-action{
  display:inline-block;
  margin:30px auto;
  padding:10px 15px;
  cursor:pointer;
}
// ******************************
// End of Normalize
// ******************************

// Basic element style
.elem{
  position:relative;
  display:inline-block;
  width:100px;
  height:100px;
  margin:auto 10px;
  vertical-align:center;
  &.one {
    background-color:#8585e5;
  }
  &.two {
    background-color:#1b9bd6;
  }
  &.three {
    background-color:#74c651;
  }
  &.four {
    background-color:#e03e71;
  }
  span{
    display:block;
    padding:32% 10px 10px;
  }
}
              
            
!

JS

              
                $(function() {
  // Get the trigger button
  var doButton = $('#btn-action');
  
  // Callbacks
  var cbStart = function(){
    doButton.text('Doing KUTE!');
  },
      cbComplete = function(){
        doButton.text('START');
      };
  
  // KUTE elements
  var elems = document.querySelectorAll('.elem'),
      tween1 = KUTE.allFromTo(
        elems, // Target element
        // from value
        {borderRadius:0, 
         rotate:0
        },
        // to value
        {borderRadius:'100%', 
         rotate:405
        },
        // Options and callbacks
        {offset: 400, // tween offset time
         duration: 800, // tween duration time
         easing:'easingCubicInOut',
         repeat:1, // repeat count
         yoyo:true,   // whether reverse
         start:cbStart, // When kute started
         complete: cbComplete // When kute completed
        }
      );
  
  // Do KUTE
  doButton.on('click', function(){
    tween1.start();
  });
});
              
            
!
999px

Console