Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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

Auto Save

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 version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 500 500">

  <g id="left_gift" style="opacity:1;">
    <polygon class="st354" points="341.5,373 339.8,360.3 325.8,358.8 312,357.3 305.7,365.5 299.1,374.1 301.4,387 303.6,399.7 
		317.6,401.5 331.9,403.4 337.7,394.2 343.2,385.4 	" />
    <polygon class="st428" points="341.5,373 339.8,360.3 334.1,368.7 328,377.5 330,390.6 331.9,403.4 337.7,394.2 343.2,385.4 	" />
    <polygon class="st429" points="330,390.6 328,377.5 313.4,375.8 299.1,374.1 301.4,387 303.6,399.7 317.6,401.5 331.9,403.4 	" />
    <polygon class="st430" points="325.8,358.8 312,357.3 305.7,365.5 299.1,374.1 313.4,375.8 328,377.5 334.1,368.7 339.8,360.3 	" />
    <polygon class="st431" points="303.4,368.5 304.5,367 302.9,365.6 	" />
    <polygon class="st432" points="328.3,356.9 323.7,356.4 322.2,358.4 322.7,360.7 	" />
    <polygon class="st433" points="322.7,360.7 322.2,358.4 319.5,346.3 307.2,348.5 	" />
    <polygon class="st434" points="315.7,367 306.1,362.6 305.3,362.5 302.9,365.6 315.7,367 	" />
    <polygon class="st435" points="315.7,367 302.9,365.6 304.5,367 315,368.2 315.7,367.2 	" />
    <polygon class="st436" points="322.7,360.7 307.2,348.5 315.2,363.2 	" />
    <polygon class="st437" points="315.2,363.2 304.1,361.7 306.1,362.6 315.7,367 	" />
    <polygon class="st438" points="307.2,348.5 304.1,361.7 315.2,363.2 	" />
    <polygon class="st439" points="334.3,369.1 336.4,366 329.3,365.2 329.2,368.5 	" />
    <polygon class="st440" points="338.4,380.1 336.4,366 334.3,369.1 336.3,383.4 338,396 340.1,392.7 	" />
    <polygon class="st441" points="329.2,368.5 329.2,368.9 326.2,369.5 333,370.3 334.3,369.1 	" />
    <polygon class="st442" points="334.3,369.1 333,370.3 334.8,383.2 336.6,395.8 338,396 336.3,383.4 	" />
    <polygon class="st443" points="318.6,371 316.3,371.5 315.7,367.2 315,368.2 309.9,375 315.2,375.7 	" />
    <polygon class="st444" points="315.2,375.7 309.9,375 312.3,389.4 314.4,402.1 319.6,402.8 317.5,390.1 	" />
    <polygon class="st445" points="315.2,375.7 316.1,376.1 319.9,370.7 318.6,371 	" />
    <polygon class="st446" points="317.5,390.1 319.6,402.8 320.2,401.9 318.2,389.1 316.1,376.1 315.2,375.7 	" />
    <polygon class="st447" points="324.3,364.4 329.5,356.1 328.3,356.9 322.7,360.7 	" />
    <polygon class="st448" points="322.7,360.7 315.2,363.2 324.3,364.4 	" />
    <polygon class="st449" points="315.2,363.2 315.7,367 315.7,367 315.7,367.2 316.3,371.5 324.3,364.4 	" />
    <polygon class="st450" points="324.3,364.4 329.2,368.9 329.2,368.5 329.3,365.2 329.5,356.1 	" />
    <polygon class="st451" points="324.3,364.4 316.3,371.5 318.6,371 319.9,370.7 326.2,369.5 329.2,368.9 	" />
    <polygon class="st452" points="333.6,369 334.7,365.8 329.3,365.2 329.2,368.5 	" />
    <path class="st453" d="M326.2,369.5l-6.2,1.3l-1.7,2.4l-2.1,3l2.1,13l2,12.7l0,0l0.6,0.1l-3.9-25.7l2-3.3l0.1,0l0.2,1.6l11.1-0.3
		l2.5-3.6l0.1-0.4L326.2,369.5z" />
    <polygon class="st454" points="315.7,367 315.7,367 304.8,363.2 305.3,362.5 306.1,362.6 	" />
    <polygon class="st455" points="333,370.3 328,377.5 331.9,403.4 336.6,395.8 	" />
    <polygon class="st456" points="339.8,390.7 343.2,385.4 339.8,360.3 336,365.9 336.4,366 	" />
    <polygon class="st457" points="325.5,356.6 323.7,356.4 322.2,358.4 322.7,360.7 325.7,358.6 	" />
  </g>


  <path id="anim_path" class="st458" d="M103.5,371.5c0-99,26.4-184.2,84-213.3c64-32.4,175.9,91.2,180.5,212.8" />
</svg>
              
            
!

CSS

              
                svg {
  width:500px;
}  


.st309{fill:#A90000;}
	.st310{fill:#D9361B;}
	.st311{fill:#EEA294;}
	.st312{fill:#952F31;}
	.st313{fill:#B30001;}
	.st314{fill:#F0ADA1;}
	.st315{fill:#C68F90;}
	.st316{fill:#CC0100;}
	.st317{fill:#D64428;}
	.st318{fill:#E88373;}
	.st319{fill:#D41A00;}
	.st320{fill:#BA0001;}
	.st321{fill:#FDF4F2;}
	.st322{fill:#D20F01;}
	.st323{fill:#AF6163;}
	.st324{fill:#883E35;}
	.st325{fill:#EA8E80;}
	.st326{fill:#CB0100;}
	.st327{fill:#DF553B;}
	.st328{fill:#AF0000;}
	.st329{fill:#D00200;}
	.st330{fill:#FCC58F;}
	.st331{fill:#FAA902;}
	.st332{fill:#FDD689;}
	.st333{fill:#FDD78C;}
	.st334{fill:#FDD98E;}
	.st335{fill:#FEF3DC;}
	.st336{fill:#FDE3AC;}
	.st337{fill:#FEE0A2;}
	.st338{fill:#FEE5B4;}
	.st339{fill:#FFFDFB;}
	.st340{fill:#FBC352;}
	.st341{fill:#FFFDF7;}
	.st342{fill:#FFFBF3;}
	.st343{fill:#FDD584;}
	.st344{fill:#FDDE9E;}
	.st345{fill:#FBBB39;}
	.st346{fill:#FAB068;}
	.st347{fill:#FBB421;}
	.st348{fill:#FDDD99;}
	.st349{fill:#EABC41;}
	.st350{fill:#FFF9EE;}
	.st351{fill:#FDD481;}
	.st352{fill:#FFFAF6;}
	.st353{fill:#FDE0A4;}
	.st354{fill:#FFFFFF;}
	.st355{fill:#FBB21C;}
	.st356{fill:#FBAF17;}
	.st357{fill:#C0A63B;}
	.st358{fill:#FBB82D;}
	.st359{fill:#FED179;}
	.st360{fill:#E64B47;}
	.st361{fill:#FCC14A;}
	.st362{fill:#FCCEA2;}
	.st363{fill:#FFF7E6;}
	.st364{fill:#FCC34F;}
	.st365{fill:#FEE8BC;}
	.st366{fill:#FCC24F;}
	.st367{fill:url(#SVGID_184_);}
	.st368{fill:#E0C277;}
	.st369{fill:#A59D98;}
	.st370{fill:#DCD0CA;}
	.st371{fill:#E3D8D6;}
	.st372{fill:#601716;}
	.st373{fill:#C02925;}
	.st374{fill:#B22B29;}
	.st375{fill:#D93935;}
	.st376{fill:#BB2925;}
	.st377{fill:#DE4A46;}
	.st378{fill:#511312;}
	.st379{fill:#CD2F2A;}
	.st380{fill:#C92C28;}
	.st381{fill:#DC3631;}
	.st382{fill:#862323;}
	.st383{fill:#5A181A;}
	.st384{fill:#5B1818;}
	.st385{fill:#511517;}
	.st386{fill:#CF413F;}
	.st387{fill:#B42B27;}
	.st388{fill:#972422;}
	.st389{fill:#952422;}
	.st390{fill:#CA3736;}
	.st391{fill:#C12D2A;}
	.st392{fill:#CE3A38;}
	.st393{fill:#761D1B;}
	.st394{fill:#962422;}
	.st395{fill:#B2B1AE;}
	.st396{fill:#A49D98;}
	.st397{fill:#A22C29;}
	.st398{fill:#8B2220;}
	.st399{fill:#B3B0AE;}
	.st400{fill:#A79D99;}
	.st401{fill:#8F9481;}
	.st402{fill:#E7E5D9;}
	.st403{fill:#DAD7C2;}
	.st404{fill:#44A24A;}
	.st405{fill:#45A44A;}
	.st406{fill:#358B45;}
	.st407{fill:#2F8848;}
	.st408{fill:#0F2F1B;}
	.st409{fill:#2E8142;}
	.st410{fill:#277C44;}
	.st411{fill:#3A9547;}
	.st412{fill:#318340;}
	.st413{fill:#1A4422;}
	.st414{fill:#184122;}
	.st415{fill:#3A7F33;}
	.st416{fill:#44923C;}
	.st417{fill:#51B046;}
	.st418{fill:#3A883C;}
	.st419{fill:#327432;}
	.st420{fill:#143619;}
	.st421{fill:#2A6A33;}
	.st422{fill:#1B5D36;}
	.st423{fill:#ADB2A6;}
	.st424{fill:#276E37;}
	.st425{fill:#ADB5A9;}
	.st426{fill:#2D7636;}
	.st427{fill:#ADB3A8;}
	.st428{fill:#A8A19B;}
	.st429{fill:#DCD1CD;}
	.st430{fill:#EAE5E4;}
	.st431{fill:#AB2922;}
	.st432{fill:#BF2E21;}
	.st433{fill:#E54639;}
	.st434{fill:#C53931;}
	.st435{fill:#AF2B23;}
	.st436{fill:#C93225;}
	.st437{fill:#BA2C23;}
	.st438{fill:#D4463D;}
	.st439{fill:#AE2A21;}
	.st440{fill:#591612;}
	.st441{fill:#731B17;}
	.st442{fill:#4F1311;}
	.st443{fill:#B73C38;}
	.st444{fill:#942420;}
	.st445{fill:#6B1A16;}
	.st446{fill:#661816;}
	.st447{fill:#D03B31;}
	.st448{fill:#C33025;}
	.st449{fill:#C64038;}
	.st450{fill:#7B1D16;}
	.st451{fill:#86201A;}
	.st452{fill:#8C221C;}
	.st453{fill:#B8B9B8;}
	.st454{fill:#942D26;}
	.st455{fill:#A6A19B;}
	.st456{fill:#ADA8A1;}
	.st457{fill:#96261B;}
	.st458{fill:none;stroke:#000000;stroke-miterlimit:10;}
              
            
!

JS

              
                var gift = document.querySelector("#left_gift");
var bbox = gift.getBBox();

var bezierData = MorphSVGPlugin.pathDataToBezier("#anim_path", {
  offsetX: -bbox.x,
  offsetY: -bbox.y
});

TweenLite.set(gift, {
  x: bezierData[0].x,
  y: bezierData[0].y,
  xPercent: -50,
  yPercent: -50
});

TweenMax.to(gift, 2, {
  bezier: { values: bezierData, type: "cubic" },
  ease: Linear.easeNone,
  repeat: -1,
  yoyo: true
});

// requires MorphSVGPlugin https://greensock.com/morphSVG which is a bonus plugin for Club GreenSock members (Shockingly Green and Business Green).
// more info on Club GreenSock: https://www.greensock.com/club
              
            
!
999px

Console