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.

            
              <div class="wrap">
  <div class="title">
    <h2>Happy Holidays from <a href="webanimationworkshops.com">Web Animation Workshops!</a></h2>
 </div>
  <p class="play">click to play</p>
  <svg id="wawxmas" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 824 345">
  <defs>
    <linearGradient id="linear-gradient" x1="418.18" y1="143.67" x2="440.61" y2="166.11" gradientTransform="rotate(-7.9 406.906 271.104)" gradientUnits="userSpaceOnUse">
      <stop offset="0" stop-color="#fc332e"/>
      <stop offset="1" stop-color="#ce1716"/>
    </linearGradient>
    <filter id="blur">
			<feGaussianBlur stdDeviation="0" />
		</filter>
  </defs>
  <path d="M0 0h824v345H0z" class="back-temp"/>
  <ellipse cx="410" cy="241" rx="84.3" ry="19" class="hole-top"/>
  <g class="ice">
    <ellipse class="surface" cx="411" cy="237" rx="338" ry="69"/>
    <path class="lines" d="M470 277c103 0 144.8-44.6 108-50-34-5-21 50 56 38m-320-83s-121.1-7-119 26c1 16 23.3 31.5 34 25 18-11-17-33-85-21"/>
  
  </g>
  <g class="waw-logo">
  <g class="waw-triangle">
    <path class="gap-fill" class="cls-6" d="M447 216.3v-.1l-36.5-64.1-34.3 61.9-.1-.1-14.9 26.9H461l-14-24.5z"/>
    <path class="top-light" class="cls-7" d="M386.6 226.7l22.8-42.8a1.8 1.8 0 0 1 1.6-1 1.8 1.8 0 0 1 1.6 1l23.2 42.9 8-15.9-33.4-58.7-32.1 57.8z"/>
    <path class="bottom-dark" d="M437.6 231.5a1.8 1.8 0 0 1-3.3.1L411 188.7l-22.9 42.9a1.8 1.8 0 0 1-1.6 1 1.8 1.8 0 0 1-1.6-1l-8.7-17.6-14.9 26.8H461l-14.9-26.1z"/>
    </g>
    <path class="twirl" d="M379.5 204.5c-9.2.3-29 7.3 33 3 58-4 33-9 27-8"/>
  </g>
  <g class="santa-hat">
    <path class="top" d="M427 168.5s-4.6-25.2-22.4-40.4c-6.9-.5-23.5 6.5-23.5 6.5s-10.7 13.2-8.6 26c6.2-.5 16.4-11.9 16.4-11.9s-6.3 12.8-2.8 25.7c6 1.1 40.9-5.9 40.9-5.9z"/>
    <path class="brim" d="M380.7 161.5s.8-7-8.3-6.9c-5.4.2-10.6 7.1-5.3 14.2a7.9 7.9 0 0 1 .7-2.5 8 8 0 0 0 6.7 5.9l-1.6-2.7s10 1.1 10.4-8.9a8 8 0 0 1-2.6.9zm1.4 10.6s-3.9 2.6-1.3 14l1.4-3.2s.3 6.6 6.2 8.1a93.5 93.5 0 0 0 10.3-2l-1.8-1.3a173.7 173.7 0 0 1 24.5-2.5l-.9-1.4s14-.6 14.7-6.9l1.4 1.6a15.3 15.3 0 0 0-5.4-12.3c-3.1-.6-9.2.9-11.8 1.6l-3 .6a35.4 35.4 0 0 1-9.1 0l2 2.1s-23-.4-27.2 1.6z"/>
  </g>
    
  <path d="M0 241h822v104H0z" class="bot-cover"/> 
  <path d="M410 260c46.5 0 84.3-8.5 84.3-19H325.7c0 10.5 37.8 19 84.3 19z" class="hole-bottom"/>
</svg>
</svg>



</div>
            
          
!
            
              @import url('https://fonts.googleapis.com/css?family=Athiti:400,700');
body {
  background:#353535;
  font-family: 'Athiti', Helvetica, Arial, sans-serif;
}

h2 {
  font-size: 1.2rem;
  font-weight: 300;
  color: white;
  margin: 0.5em 1em;
}

.title {
  background: black;
  width: 100vw;
  margin: 0;
  position: absolute; 
  top: 0;
  left:0;
  text-align: center;
}

#wawxmas {
  width: 100vw;
  height: 100vh;
}

p {
  color: white;
  text-transform: uppercase;
  text-align: center;
  position: absolute;
  display: block;
  cursor: pointer;
  left: 50vw;
  top: 50vh;
  transform: translateX(-50%);
  font-size: 1.2rem;
}

.bot-cover, .back-temp {
  fill:#353535;
}
.gap-fill { fill: #fcfcfc; } 
.top-light { fill: #e8be78; } 
.bottom-dark { fill: #dba25e; }

.santa-hat {opacity:0;}
.santa-hat .top { fill: url(#linear-gradient); } 
.santa-hat .brim { fill: #fff; }

.twirl {
 stroke: #d6d6d6;
  fill: none;
  stroke-linecap: round; 
  stroke-width: 1;  
}

.ice .surface { fill: #869da3; } 

.ice .lines { fill: none; stroke: #99aaad; stroke-miterlimit: 10; stroke-width: 2px; }


.hole-top, .hole-bottom { fill: #232323; }

.waw-logo {
  filter: url(#blur);
}

a, a:link, a:active {
  color:white;
  text-decoration: none;
}

a:hover {
  color: #EE4E2F;
}
            
          
!
            
              var santaHat = document.querySelector('.santa-hat'),
    waw = document.querySelector('.waw-logo'),
    wawtri = document.querySelector('.waw-triangle'),
    wawbox = document.querySelector('#wawxmas'),
    holebot = document.querySelector('.hole-bottom'),
    holetop = document.querySelector('.hole-top'),
    twirl = document.querySelector('.twirl'),
    ice = document.querySelector('.ice'),
    botcover = document.querySelector('.bot-cover'),
    play = document.querySelector('.play'),
    blur = document.querySelector('feGaussianBlur');

TweenMax.set([santaHat, holetop, holebot, waw, ice, twirl], {opacity:0});
TweenMax.set([holetop, holebot], {transformOrigin:"50% 50%"});
TweenMax.set(waw, {transformOrigin:"100% 100%"});

var tl = new TimelineMax();
tl.add('fallin');
tl.fromTo(play, .15, {y:'0', autoAlpha:1}, {y:'100', autoAlpha:0, ease:Power3.easeIn},'fallin');
tl.add('open');
tl.add("enter", 'open+=0.25');
tl.set(waw, {opacity:1}, 'enter');
tl.fromTo(waw, .3, {y:100}, {y:0, ease: Back.easeOut.config(1)}, 'enter');
tl.fromTo([holetop, holebot], .15, {autoAlpha:.75, scale:1},{autoAlpha:0, scale:.25, ease: Power3.easeOut}, 'enter+=.70');
tl.set(botcover, {autoAlpha:0}, 'enter+=.75');
tl.fromTo(ice, 1, {autoAlpha:0}, {autoAlpha:0.8, ease: Power3.easeOut},'enter+=1.4');
tl.fromTo(waw, .15, {rotation:10}, {rotation:0, ease: Power2.easeOut}, 'enter-=0.05');

tl.add('slideR');
tl.set(waw, {transformOrigin: "0% 100%"}, 'slideR');
tl.fromTo(waw, .15, {rotationZ: 0}, {rotationZ:-4, ease: Power2.easeOut}, 'slideR+=1');
tl.fromTo(waw, .15, {rotationZ: -4}, {rotationZ:0, ease: Power2.easeIn}, 'slideR+=1.15');
tl.set(waw, {transformOrigin: "100% 100%"}, 'slideR+=1.3');
tl.fromTo(waw, .15, {rotationZ:0}, {rotationZ:10, ease: Power2.easeOut }, 'slideR+=1.3');
tl.fromTo(waw, .35, {x:0},{x:100, ease: Power2.easeOut}, 'slideR+=1.35');

tl.add('spin');
tl.set(wawtri, {transformOrigin: "100% 100%"}, 'spin');
tl.to(wawtri, .2, {skewY:50, scaleX:0, ease:Power2.easeIn},  'spin+=.1');
tl.to(wawtri, .01, {skewY:-50, scaleX:0}, 'spin+=.3');
tl.to(wawtri, .2, {skewY:0, scaleX:1, ease:Power2.easeOut}, 'spin+=.31');
tl.set(twirl, {opacity:1, drawSVG:"0%", x:"15"}, 'spin');
tl.fromTo(twirl, 0.25, {drawSVG:"0%"}, {drawSVG:"100%", ease:Power2.easeIn}, 'spin+=0.10');
tl.fromTo(twirl, 0.25, {drawSVG:"100%"}, {drawSVG:"0%", ease:Power2.easeOut}, 'spin+=0.30');
tl.fromTo(waw, .15, {rotationZ:10}, {rotationZ:0, ease:Back.easeOut.config(1)}, 'spin+=.47');
tl.set(waw, {transformOrigin: "0% 100%"}, 'spin+=.52');
tl.fromTo(waw, .15, {rotationZ:0}, {rotationZ:-10, ease:Power2.easeIn}, 'spin+=.52');
tl.to(waw, .55, {x:-100, ease:Power2.easeOut}, 'spin+=.49');

tl.add('hop');
tl.fromTo(waw, .15, {y:0, rotationZ:-10}, {y:-20, rotationZ:-10, ease:Power2.easeIn}, 'hop');
tl.fromTo(waw, .1, {y:-20, rotationZ:-10}, {y:0, rotationZ:-10, ease:Power2.easeOut}, 'hop+=.15');

tl.add('slideL');
tl.fromTo(waw, .2, {rotationZ:-10}, {rotationZ:0, ease:Power2.easeOut}, 'slideL+=.25');
tl.set(waw, {transformOrigin: "100% 100%"}, 'slideL+=.35');
tl.fromTo(waw, .2, {rotationZ:0}, {rotationZ:10, ease:Power2.easeOut}, 'slideL+=.35');
tl.to(waw, .35, {x:'+=100', ease:Power2.easeOut}, 'slideL+=.36');
tl.to(waw, .25, {rotationZ:0, ease:Back.easeOut.config(1.3)}, 'slideL+=.36');

tl.add('fin');
tl.set(wawtri, {transformOrigin: "50% 100%"}, 'fin');
// tl.fromTo(waw, 1, {rotationY:0}, {rotationY:-720, ease:Power2.easeInOut}, 'fin');
tl.to(wawtri, .08, {skewY:50, scaleX:0, ease:Power2.easeIn},  'fin');
tl.to(wawtri, .01, {skewY:-50, scaleX:0}, 'fin+=.08');
tl.to(wawtri, .08, {skewY:0, scaleX:1}, 'fin+=.09');
tl.to(wawtri, .08, {skewY:50, scaleX:0},  'fin+=.17');
tl.to(wawtri, .0, {skewY:-50, scaleX:0}, 'fin+=.2');
tl.to(wawtri, .1, {skewY:0, scaleX:1, ease:Power2.easeOut}, 'fin+=.25');

tl.to(blur, .15, {attr:{stdDeviation:'2,0'}, ease:Power2.easeOut}, 'fin+=0.1');
tl.to(blur, .15, {attr:{stdDeviation:'0,0'}, ease:Power2.easeIn}, 'fin+=0.2');
tl.set([waw, wawtri], {transformOrigin: '50% 100%'}, 'fin');
tl.set(twirl, {x:"0"}, 'fin');
tl.fromTo(twirl, 0.25, {drawSVG:"0%"}, {drawSVG:"100%", ease:Power2.easeIn}, 'fin+=0.05');
tl.fromTo(twirl, 0.25, {drawSVG:"100%"}, {drawSVG:"0%", ease:Power2.easeOut}, 'fin+=0.15');
tl.fromTo(waw, .20, {y:'0'}, {y:'-40', ease:Power2.easeOut}, 'fin+=.95');
tl.fromTo(waw, .15, {y:'-40'}, {y:'0', ease:Back.easeOut}, 'fin+=1.1');
tl.set(santaHat, {y:'-50'}, 'fin+=1.1');
tl.fromTo(santaHat, .15, {opacity:0}, {opacity:1, ease: Power2.easeOut}, 'fin+=1.1');
tl.to(santaHat, .15, {y:'0', ease: Back.easeOut}, 'fin+=1.2');

tl.timeScale(1);
tl.pause();

play.onclick = function() {
  tl.play();
}
            
          
!
999px
Loading ..................

Console