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 viewBox="0 0 134 72" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="top-left" d="M41.2789 34.467C41.2789 16.6279 53.7108 2.16649 69.0465 2.16649L66.8381 0.763184C47.0453 0.763184 31 16.6803 31 36.3151H41.3235C41.2939 35.7035 41.2789 35.0873 41.2789 34.467Z" fill="red"/>
<path id="top-right" d="M102.676 36.3151C102.676 16.6803 86.6311 0.763184 66.8382 0.763184L69.0466 2.16649C84.3822 2.16649 96.8142 16.6279 96.8142 34.467C96.8142 35.0873 96.7992 35.7035 96.7695 36.3151H102.676Z" fill="green"/>

</svg>

              
            
!

CSS

              
                svg {
  width: 400px
}
              
            
!

JS

              
                const leftTop = document.querySelector('#top-left')

const rightTop = document.querySelector('#top-right')

const leftBot = document.querySelector('#bot-left')

const rightBot = document.querySelector('#bot-right')

const leftTopInner =
  'M72.4554 34.7038C72.4554 16.8647 66.5 2.40331 68 2.40331L67 1C65.1619 1 62 16.6852 62 36.32H72.5C72.4704 35.7084 72.4554 35.3241 72.4554 34.7038Z'

const topRightInner =
  'M72.5 36.3151C72.5 16.6803 69.5 -0.5 67 0.999999L66 2.16649C68 3 66.8382 15 66.8382 34.467C66.8382 35.0873 66.8232 35.7035 66.7935 36.3151H72.5Z'

const topLeftOutside =
  'M72.2789 34.467C72.2789 16.6279 84.7108 2.16649 100.047 2.16649L97.8381 0.763184C78.0453 0.763184 62 16.6803 62 36.3151H72.3235C72.2939 35.7035 72.2789 35.0873 72.2789 34.467Z'

const topRightOutside =
  'M133.676 36.3151C133.676 16.6803 117.631 0.763184 97.8382 0.763184L100.047 2.16649C115.382 2.16649 127.814 16.6279 127.814 34.467C127.814 35.0873 127.799 35.7035 127.769 36.3151H133.676Z'

const botRightOutside =
  'M62.1974 37.8481C62.1974 55.6872 49.7655 70.1486 34.4298 70.1486L36.6382 71.5519C56.431 71.5519 72.4763 55.6348 72.4763 36L62.1528 36C62.1824 36.6116 62.1974 37.2278 62.1974 37.8481Z'

const botRightInner =
  'M62.0446 37.9262C62.0446 55.7653 68 70.2267 66.5 70.2267L67.5 71.63C69.3381 71.63 72.5 55.9448 72.5 36.31L62 36.31C62.0296 36.9216 62.0446 37.3059 62.0446 37.9262Z'

const botLeftInner =
  'M62 36.3149C62 55.9497 65 73.13 67.5 71.63L68.5 70.4635C66.5 69.63 67.6618 57.63 67.6618 38.163C67.6618 37.5427 67.6768 36.9265 67.7065 36.3149L62 36.3149Z'

const botLeftOutside =
  'M0.799987 36C0.799985 55.6348 16.8453 71.5519 36.6382 71.5519L34.4298 70.1486C19.0942 70.1486 6.66218 55.6872 6.66218 37.8481C6.66218 37.2278 6.67719 36.6116 6.70689 36L0.799987 36Z'

const topTl = new TimelineMax({
  repeat: -1,
  repeatDelay: .25,
  yoyo:true
})

const botTl = new TimelineMax({
  repeat: -1,
  repeatDelay: .25,
  yoyo:true
})


  topTl.to(leftTop, 1, {
    x: 0,
    attr: { d: leftTopInner },
    ease: Power2.easeOutCirc,
  })
  .to(
    rightTop,
    1,
    {
      x: 0,
      attr: { d: topRightInner },
      ease: Power2.easeOutCirc,
    },
    '-=1'
  )
  .to(leftTop, 1, {
    x: 0,
    attr: { d: topLeftOutside },
    ease: Power2.easeInOutCirc,
  })
  .to(
    rightTop,
    1,
    {
      x: 0,
      attr: { d: topRightOutside },
      ease: Power2.easeInOutCirc,
    },
    '-=1'
  )

botTl.to(leftBot, 1, {
    x: 0,
    attr: { d: botLeftInner },
    ease: Power2.easeOutCirc,
  })
  .to(
    rightBot,
    1,
    {
      x: 0,
      attr: { d: botRightInner },
      ease: Power2.easeOutCirc,
    },
    '-=1'
  )
  .to(leftBot, 1, {
    x: 0,
    attr: { d: botLeftOutside },
    ease: Power2.easeInOutCirc,
  })
  .to(
    rightBot,
    1,
    {
      x: 0,
      attr: { d: botRightOutside },
      ease: Power2.easeInOutCirc,
    },
    '-=1'
  )


              
            
!
999px

Console