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">
  <svg class="svg-elem" id="svg-elem" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 550 550" >
    <path id="w11" class="bg-red" d="M206.115,255.957c-23.854-12.259-47.043-18.479-68.94-18.479c-2.978,0-5.976,0.09-8.974,0.354 c-27.94,2.312-53.461,9.684-69.875,15.414c-4.354,1.599-8.817,3.288-13.415,5.152L0,414.096 c30.851-11.416,58.146-16.969,83.135-16.969c40.423,0,69.764,15.104,93.996,30.652c11.481-38.959,39.022-133.045,47.241-161.162 C218.397,262.975,212.334,259.332,206.115,255.957z"/>
    <path id="w12" class="bg-orange" d="M264.174,295.535l-45.223,157.074c13.416,7.686,58.549,32.024,93.105,32.024 c27.896,0,59.127-7.147,95.417-21.896l43.179-150.988c-29.316,9.461-57.438,14.26-83.732,14.26 C318.945,326.01,285.363,310.461,264.174,295.535z"/>
    <path id="w13" class="bg-green" d="M146.411,184.395c38.559,0.399,67.076,15.104,90.708,30.251l46.376-158.672c-9.772-5.598-35.403-19.547-53.929-24.3c-12.193-2.842-25.01-4.308-38.602-4.308c-25.898,0.488-54.194,6.973-86.444,19.9 L60.3,202.564c32.404-12.218,60.322-18.17,86.043-18.17C146.366,184.395,146.411,184.395,146.411,184.395L146.411,184.395z"/>
    <path id="w14" class="bg-blue" d="M512,99.062c-29.407,11.416-58.104,17.233-85.514,17.233c-45.844,0-79.646-15.901-101.547-31.183L278.964,244.23 c30.873,19.854,64.146,29.939,99.062,29.939c28.474,0,57.97-6.84,87.73-20.344l-0.091-1.111l1.867-0.443L512,99.062z"/>

    <path id="w21" style="visibility:hidden" d="M0.175 256l-0.175-156.037 192-26.072v182.109z"/>
    <path id="w22" style="visibility:hidden" d="M224 69.241l255.936-37.241v224h-255.936z"/>
    <path id="w23" style="visibility:hidden" d="M479.999 288l-0.063 224-255.936-36.008v-187.992z"/>
    <path id="w24" style="visibility:hidden" d="M192 471.918l-191.844-26.297-0.010-157.621h191.854z"/>
  </svg>
</div>

<div><button type="button" id="btn" class="btn">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:10px 0;
  a, a:visited{
    color: $link_color;
    text-decoration:none;
  }
  a:hover{
    color: $link_hover_color;
  }
}
.btn{
  display:inline-block;
  margin:20px auto;
  padding:10px 15px;
  cursor:pointer;
}
// ******************************
// End of Normalize
// ******************************

// Basic element style
.elem{
  position:relative;
  display:inline-block;
  width:150px;
  height:150px;
  margin:auto 10px;
}
.bg-red{
  fill:#e91b1f;
}
.bg-orange{
  fill:#FF5722;
}
.bg-green{
  fill:#4CAF50;
}
.bg-blue{
  fill:#2196F3;
}
              
            
!

JS

              
                $(function() {
  var morph1 = KUTE.to(
    '#w11', // Target
    { path: '#w24', // Morphing target path
      fill:'#0dc3e8'},
    { // options
      yoyo: true, 
      repeat: 1, 
      duration: 2000,
      easing:'easingCubicInOut',
      reverseSecondPath:true
    }),
      // Second morph
      morph2 = KUTE.to(
        '#w13', 
        { path: '#w21',
          fill:'#0dc3e8'}, 
        { 
          yoyo: true, 
          repeat: 1, 
          duration: 2000,
          easing:'easingCubicInOut',
          reverseSecondPath:true
        }),
       // Third morph
      morph3 = KUTE.to(
        '#w14', 
        { path: '#w22',
          fill:'#0dc3e8' }, 
        { 
          yoyo: true, 
          repeat: 1, 
          duration: 2000,
          easing:'easingCubicInOut',
          reverseSecondPath:true
        }),
       // Fourth morph
      morph4 = KUTE.to(
        '#w12', 
        { path: '#w23',
          fill:'#0dc3e8' }, 
        { 
          yoyo: true, 
          repeat: 1, 
          duration: 2000,
          easing:'easingCubicInOut',
          reverseSecondPath:true
        });
  
  // Do KUTE
  $('#btn').on('click', function(){
    morph1.start();
    morph2.start();
    morph3.start();
    morph4.start();
  });
});
              
            
!
999px

Console