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. 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

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

              
                
<svg width="500" height="500" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg">
  
  <clipPath id="myClip">
      <path class="clip" d="M22.683 328.31c24.589 91.768 237.69 110.45 329.457 85.861S498.366 295.257 473.777 203.49c-9.324-34.797-28.674-64.23-54.11-86.023-41.645-35.679-99.601-50.88-156.571-35.614C171.329 106.442-1.906 236.543 22.683 328.31Z" fill="#ccc"/>
  </clipPath>
  
  <g class="eye_group" clip-path="url(#myClip)">
  
  <path class="eye_1" d="M22.683 328.31c24.589 91.768 237.69 110.45 329.457 85.861S498.366 295.257 473.777 203.49c-9.324-34.797-28.674-64.23-54.11-86.023-41.645-35.679-99.601-50.88-156.571-35.614C171.329 106.442-1.906 236.543 22.683 328.31Z" fill="#ccc"/>
  
  <circle class="pupil" cx="363.743" cy="260.82" r="115.465" fill="#2c5aa0"/>
    
  </g>
  
  <path class="eye_2" d="M25.082 345.537c24.589 91.768 237.69 110.45 329.458 85.86 91.767-24.588 146.226-118.914 121.637-210.68-9.324-34.798-20.73-6.485-54.111-3.723l-156.57 12.956C170.813 237.785.492 253.77 25.081 345.537Z" fill="#2c5aa0"/>
  
</svg>



              
            
!

CSS

              
                .eye_2 {
  visibility: hidden;
}
              
            
!

JS

              
                var tl = gsap.timeline({
  
  repeat: -1,
  repeatDelay: 0.5,
  
  yoyo: true,  
  
  defaults: {
    duration: 1,
    ease: 'power1.inOut'
  }   
  
});

tl
.to(".eye_1, .clip", {morphSVG: ".eye_2"}, 0)
.to(".pupil", {y: 40, x: -10}, 0)
              
            
!
999px

Console