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 CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

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.

	  <polygon id="polygon" points="240,220 240,70 70,70 70,220"/>
              #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})
		.to("#polygon", 1.5, {morphSVG:"240,220 240,70 70,70 70,220", rotation:0, scale:1, fill: "black", ease:Elastic.easeOut});
Loading ..................