123

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

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

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.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200" width="100" height="100" version="1.1">

    <circle  cx="100" cy="100" r="100" fill="#b2d4e5" >
      <animate
      dur="0.3s" begin="startAnimation.begin" attributeName="r" values="100; 85; 100" fill="freeze"  keyTimes:"0; 0.5; 1"  />
      <animate
      dur="0.3s" begin="reverseAnimation.begin" attributeName="r" values="100; 85; 100" fill="freeze"  />
    </circle>

    <!-- vertical line -->
    <path d="M100 50 l0 100" stroke="white" stroke-width="20" stroke-linecap="round" >
      <animate
        dur="0.3s" begin="startAnimation.begin" attributeName="d" values="M100 50 l0 100; M100 100 l0 0; M100 150 l50 -100" fill="freeze"   />
      <animate
        dur="0.3s" begin="reverseAnimation.begin" attributeName="d" values="M100 150 l50 -100; M100 100 l0 0; M100 50 l0 100" fill="freeze" />
    </path>

    <!-- horizontal line -->
    <path d="M50 100 l100 0" stroke="white" stroke-width="20" stroke-linecap="round">
      <animate
        dur="0.3s" begin="startAnimation.begin" attributeName="d" values="M50 100 l100 0; M100 100 l0 0; M50 100 l50 50" fill="freeze" />
        <animate
        dur="0.3s" begin="reverseAnimation.begin" attributeName="d" values=" M50 100 l50 50; M100 100 l0 0; M50 100 l100 0" fill="freeze" />
    </path>
  
    <!--  controls -->
    <!-- these are on top of the visible circle.  Their radius changes depending on which is active
    Opacity is set to 0 so you can't see them-->
    <circle cx="100" cy="100" r="100" fill-opacity="0">
      <animate dur="0.01s" id="startAnimation" attributeName="r" values="100; 0" fill="freeze" begin="click" />
      <animate dur="0.01s" attributeName="r" values="0; 100" fill="freeze" begin="reverseAnimation.end" />
    </circle>
    <circle cx="100" cy="100" r="0" fill-opacity="0">
      <animate dur="0.001s" id="reverseAnimation" attributeName="r" values="100; 0" fill="freeze" begin="click" />
      <animate dur="0.001s" attributeName="r" values="0; 100" begin="startAnimation.end"  fill="freeze"  />
    </circle>
  </svg>
            
          
!
            
              body {
  text-align: center;
}

svg {
  margin-top: calc(50vh - 50px);
  circle {
   cursor: pointer;
  }
}
            
          
!
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.

Console