cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

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.

            
              <svg>
	  <polygon id="polygon" points="240,220 240,70 70,70 70,220"/>
</svg>
            
          
!
            
              #polygon {
  fill: none ;
  stroke: yellowgreen;
  stroke-width: 8;
  stroke-linejoin: round;
  fill: black;
}
svg {
  display: block;
  height: 280px;
  width: 320px;
  margin: auto;
  overflow: visible;
}
body {
  background: #333;
}
            
          
!
            
              var tl = new TimelineMax({repeat:-1});
    //animate to a star
		tl.to("#polygon", 1, { morphSVG:"264,115 183,103 150,30 116,103 36,115 93,172 80,249 150,215 219,249 208,171", fill:"purple", delay:0.5, ease:Power2.easeInOut })
    //animate to a line
		.to("#polygon", 1, {morphSVG: {points:"40,140 290,140", shapeIndex:8}, delay:0.5, ease:Power2.easeInOut})
    //rough wiggle effect before bursting forth into a rectangle...
		.to("#polygon", 0.1, {rotation:-5, transformOrigin:"50% 50%", delay:0.5})
		.to("#polygon", 0.5, {rotation:10, scale:1.2, ease:RoughEase.ease.config({strength:2, template:Back.easeInOut}), repeat:1, yoyo:true})
    //rectangle
		.to("#polygon", 1.5, {morphSVG:"240,220 240,70 70,70 70,220", rotation:0, scale:1, fill: "black", ease:Elastic.easeOut});
            
          
!
999px
Loading ..................

Console