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 xmlns="http://www.w3.org/2000/svg" viewBox="200 150 400 300"><defs><mask id="a"><path fill="#FFF" stroke="#000" stroke-miterlimit="10" stroke-width="6" d="M440 310a40 40 0 1 1-40-40 40 40 0 0 1 40 40z" class="baubleMask"/></mask></defs><g fill="none" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" class="antlerL"><path d="M391 283.52a14.77 14.77 0 0 0-14.73-14.73h-33a11 11 0 0 1-11-11v-33.34"/><path d="M351.47 268.79v-44.34"/><path d="M370.97 268.79v-44.34"/></g><g fill="none" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" class="antlerR"><path d="M409 283.52a14.77 14.77 0 0 1 14.73-14.73h33a11 11 0 0 0 11-11v-33.34"/><path d="M448.53 268.79v-44.34"/><path d="M429.03 268.79v-44.34"/></g><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M371 287s-30.76 26.24-31.9 27.39-1.63 6.54 1.91 7.36 31.6.4 31.6-7S371 287 371 287z" class="reindeerEar"/><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M432.11 287s30.76 26.24 31.9 27.39 1.63 6.54-1.91 7.36-31.6.4-31.6-7 1.61-27.75 1.61-27.75z" class="reindeerEar"/><g class="santaGroup"><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="8" d="M400.16 237.51l-24.66 31.47h49.32l-24.66-31.47z" class="santaHatTriangle"/><circle cx="400.16" cy="237.51" r="9.68" fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="8" class="santaBobble" opacity="0"/><path d="M23 0c1.8 0 3.3 1.5 3.3 3.3S24.8 6.6 23 6.6c-1.8 0-3.3-1.5-3.3-3.3S21.2 0 23 0zm-7.3 9.8c-1.6-1.6-1.4-8.1-3.8-8.1S9.7 8.3 8.1 9.8 0 11.3 0 13.6s6.5 2.3 8.1 3.8 1.4 8.1 3.8 8.1 2.3-6.5 3.8-8.1 8.1-1.4 8.1-3.8-6.5-2.2-8.1-3.8z" opacity="0"/><path fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="8" d="M435 310.66c0 20.88-16 37.81-35.63 37.81s-35.63-16.93-35.63-37.81 16-37.81 35.63-37.81S435 289.78 435 310.66z" class="santaFace" opacity="0"/><rect width="74.55" height="16.94" x="362.72" y="268.98" fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="8" class="santaWool" opacity="0" rx="6.21" ry="6.21"/></g><g class="baubleGroup"><path fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="6" d="M400 268a9 9 0 1 1 9-9 9 9 0 0 1-9 9z" class="baubleRing"/><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="8" d="M440 310a40 40 0 1 1-40-40 40 40 0 0 1 40 40z" class="baubleOutline"/></g><g mask="url(#a)"><g stroke="#d91c49" stroke-miterlimit="10" stroke-width="8" class="baubleDecoration"><path fill="#f6f7fc" d="M233.91 295.41H456.5v30.12H233.91z"/><path fill="none" d="M345.2 300l18.55 20 18.54-20 18.55 20 18.55-20 18.55 20 18.55-20-18.55 20-18.55-20-18.55 20-18.55-20-18.54 20-18.55-20-18.55 20-18.55-20-18.55 20L271 300l-18.55 20-18.54-20 18.54 20L271 300l18.55 20 18.55-20 18.55 20 18.55-20z"/></g></g><path fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="6" d="M412.82 273h-25.64a.18.18 0 0 1-.18-.18v-11.64a.18.18 0 0 1 .18-.18h25.63a.18.18 0 0 1 .18.18v11.63a.18.18 0 0 1-.17.19z" class="baubleCap"/><path fill="#f6f7fc" stroke="#d91c49" stroke-miterlimit="10" stroke-width="8" d="M400.16 319c-15.45 0-28 12.28-23.88 27.29 4.38 16.07 17.32 24.12 23.88 25.92 6.55-1.8 19.5-9.86 23.88-25.92 4.09-15.05-8.43-27.29-23.88-27.29z" class="santaBeard"/><circle cx="392.62" cy="301.58" r="4.27" fill="#d91c49" class="santaEye"/><circle cx="407.16" cy="301.58" r="4.27" fill="#d91c49" class="santaEye"/><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-miterlimit="10" stroke-width="8" d="M410.7 336.25c-.85 4.21-5.19 7.61-10.54 7.61s-9.68-3.06-10.54-7.61" class="santaMouth"/><g class="reindeerGroup" opacity="0"><path fill="#f6f7fc" stroke="#d91c49" stroke-linecap="round" stroke-linejoin="round" stroke-width="8" d="M371 287l3.89 67.31s2.23 11.13 25.87 11.13 25.87-11.13 25.87-11.13L430.5 287z" class="reindeerFace"/><circle cx="400.74" cy="363.07" r="12.48" fill="#d91c49" class="reindeerNose"/><g fill="#d91c49" class="reindeerEyeGroup"><circle cx="389.62" cy="315.29" r="4.84"/><circle cx="410.13" cy="315.29" r="4.84"/></g></g></svg>
              
            
!

CSS

              
                body {
  background-color:#f6f7fc;
  overflow: hidden;
  text-align:center;
}

body,
html {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}


svg{
  width:100%;
  height:100%;
  visibility:hidden;
 
}


              
            
!

JS

              
                (function(){var e=document.querySelector(".baubleOutline").getAttribute("d"),f=document.querySelector(".baubleCap").getAttribute("d"),g=document.querySelector(".baubleRing").getAttribute("d");TweenMax.set("svg",{visibility:"visible"});MorphSVGPlugin.convertToPath("circle, rect, polygon");CustomBounce.create("bobbleBounce",{strength:.082,squash:16,endAtStart:!0,squashID:"bobbleSquash"});var b=new TimelineMax;b.to(".baubleRing",1,{y:-80,ease:"bobbleBounce"}).to(".baubleRing",1,{scaleX:1.2,scaleY:.8,
ease:"bobbleSquash",transformOrigin:"50% 100%"},"-=1");var c=new TimelineMax({repeat:9});c.to(".baubleDecoration",1,{x:73,ease:Power0.easeNone});var d=(new TimelineMax({})).timeScale(1);(new TimelineMax({})).timeScale(1);var a=(new TimelineMax({repeat:-1})).timeScale(1);d.to(".baubleOutline",1,{morphSVG:".santaFace"}).to(".baubleCap",1,{morphSVG:".santaWool",ease:Elastic.easeOut.config(1.3,.83)},"-=1").from(".santaHatTriangle",.5,{scaleY:0,transformOrigin:"50% 100%",ease:Elastic.easeOut.config(1,
.3)},"-=0.8").to(".baubleRing",.1,{morphSVG:".santaBobble"},"-=0.8").to(".baubleDecoration",1,{y:-56,ease:Anticipate.easeOut},"-=1.4").from(".santaBeard",1.3,{scaleX:.6,transformOrigin:"50% -50%",y:23,ease:Elastic.easeOut.config(1,.83)},"-=0.4").from(".santaBeard",1,{scaleY:0,transformOrigin:"50% 0%",ease:Elastic.easeOut.config(1.3,.83)},"-=1.3").staggerFrom(".santaEye",.53,{scale:0,transformOrigin:"50% 50%",ease:Elastic.easeOut.config(1,.3)},.13,"-=0.6").from(".santaMouth",.86,{drawSVG:"50% 50%",
alpha:0},"-=0.47").to(".baubleOutline",1,{morphSVG:{shape:".reindeerFace",shapeIndex:-2},ease:Sine.easeInOut},"+=2").to(".baubleCap",.5,{scale:0,transformOrigin:"50% 50%",ease:Back.easeIn},"-=1").to(".santaHatTriangle",1,{y:50,transformOrigin:"50% 100%",ease:Elastic.easeInOut},"-=1").to(".baubleRing",.6,{y:100,ease:Power0.easeNone},"-=1").to(".santaMouth",1,{drawSVG:"50% 50%",alpha:0,y:20,ease:Elastic.easeInOut},"-=1").to(".santaBeard",1,{morphSVG:".reindeerNose",ease:Elastic.easeInOut},"-=1").staggerFrom(".reindeerEar",
1,{cycle:{rotation:[-55,55],x:[10,-10],transformOrigin:["100% 0%","0% 0%"]},ease:Elastic.easeOut.config(1,.83)},.1,"-=0.5").staggerFrom(".antlerL *",.7,{drawSVG:"0% 0%",ease:Expo.easeOut},.12,"-=1").staggerFrom(".antlerR *",.7,{drawSVG:"0% 0%",ease:Expo.easeOut},.12,"-=1").to(".santaBeard",.1,{fill:"#d91c49"},"-=1").to(".santaEye",.53,{y:10,ease:Back.easeInOut},"-=1.3").staggerTo(".reindeerEar",.7,{cycle:{rotation:[-55,55],x:[10,-10],transformOrigin:["100% 0%","0% 0%"]},ease:Elastic.easeIn.config(3,
.83)},.01,"+=3").to(".baubleOutline",.26,{morphSVG:{shape:e},scale:1},"-=0.8").staggerTo(".antlerL *",.4,{drawSVG:"-1% -1%",ease:Sine.easeOut},.12,"-=1").staggerTo(".antlerR *",.4,{drawSVG:"-1% -1%",ease:Sine.easeOut},.12,"-=1").to(".santaEye",.53,{y:0,alpha:0,ease:Sine.easeOut},"-=1.3").to(".baubleCap",.6,{morphSVG:f,alpha:1,scale:1},"-=1").to(".baubleRing",.6,{y:0,morphSVG:g,ease:Elastic.easeOut.config(.7,.69)},"-=0.20").to(".santaBeard",.6,{scale:0,transformOrigin:"50% -250%",ease:Anticipate.easeOut},
"-=2").to(".baubleDecoration",1,{y:0,ease:Anticipate.easeOut},"-=1.4");a.add(c,0);a.add(d,2);a.add(b,2.152)})();
              
            
!
999px

Console