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 viewBox="0 0 800 600" xmlns="http://www.w3.org/2000/svg">
  <defs>
   
<radialGradient id="tajBgGrad" cx="360" cy="500" r="350" gradientUnits="userSpaceOnUse">
	<stop  offset="0" style="stop-color:#FFFBEB;stop-opacity:0.5"/>
	<stop  offset="0.75" style="stop-color:#FFFDF1;stop-opacity:0"/>
</radialGradient>
<radialGradient id="tajBgGradTop" cx="360" cy="0" r="350" gradientUnits="userSpaceOnUse">
	<stop  offset="0" style="stop-color:#FFFBEB"/>
	<stop  offset="0.75" style="stop-color:#FFFDF1;stop-opacity:0"/>
</radialGradient>    
   <line class="myLine" x1="300" x2="500" y1="0" y2="0" stroke="#ededed" stroke-width="2" stroke-linecap="round"/>
  
   <clipPath id="circleMask">
    <circle class="maskCircle" cx="400" cy="300" r="250" />
 
    </clipPath>   
   <clipPath id="waterMask">
<polygon fill="#000" stroke="none" stroke-width="0" stroke-miterlimit="10" points="73.1,579.1 380.2,300 421,300 742,579.1 
	"/> 
    </clipPath>
   <clipPath id="topSemiMask">
    <rect id="topSemi"  width="100%" height="300" y="0" />   
  
    </clipPath>
   </defs>

<g clip-path="url(#circleMask)">

<use xlink:href="#topSemi" class="topSemi"/>
 
 <rect class="topGrad" id="bgTop" fill="url(#tajBgGradTop)" width="800" height="600"  opacity="0"/> 

 <rect class="botSemi" width="100%" height="300" y="300" fill="#020202"/>
 
<polygon class="water" fill="#ECD379" stroke="none" stroke-width="0" stroke-miterlimit="10" points="73.1,579.1 380.2,300 421,300 742,579.1 
	"/> 
 <g clip-path="url(#topSemiMask)">
<g class="taj" fill="#000"><path d="M35,24.4h-1v-2h-1v-13h1v-1h-1v-3h-1v-4h-1v4h-1v3h-1v1h1v10h-4v-3h1v-1h-2v-3H10v3H8v1h1v3H5v-10h1v-1H5v-3H4v-4H3v4H2v3H1
	v1h1v13H1v2H0v1h35V24.4z M20,24.4h-5v-4.5c0-1.4,1.1-2.5,2.5-2.5s2.5,1.1,2.5,2.5V24.4z M12.7,24.4h-2.4v-2.2
	c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2V24.4z M24.7,24.4h-2.4v-2.2c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2V24.4z M18.2,3.5V0h-1.4
	v3.5C15,4,10,5.9,10,11.4h15C25,5.9,20,4,18.2,3.5z"></g> 
 </g>
 
  <g clip-path="url(#waterMask)"> 
   
  <g class="container" opacity="0.57"/>
 <rect class="botGrad"  fill="url(#tajBgGrad)" width="800" height="600" opacity="0"/> 
</g>
  <polygon class="water" fill="none" stroke="#ECD379" stroke-width="2" stroke-miterlimit="10" points="73.1,579.1 380.2,300 421,300 742,579.1 
	"/> 
 </g> 
     <circle class="outline" cx="400" cy="300" r="250" stroke="#C7B992" fill="transparent" stroke-width="18" opacity="1" />

</svg>

              
            
!

CSS

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

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

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

}

.myLine {
 stroke: #251600
}

.taj {
 fill: #251600
}

.topSemi {
 fill: #ECD379;
}

.botSemi {
 fill: #412E20;
}

.outline{
 cursor:pointer;
 -webkit-tap-highlight-color:rgba(0,0,0,0);
}
              
            
!

JS

              
                TweenMax.defaultEase = CustomEase.create("dedf", "M0,0 C0.324,0.174 0.434,0.972 0.634,1.07 0.835,1.168 0.82,0.95 1,1");

var xmlns = "http://www.w3.org/2000/svg",
  xlinkns = "http://www.w3.org/1999/xlink",
  select = function(s) {
    return document.querySelector(s);
  },
  selectAll = function(s) {
    return document.querySelectorAll(s);
  },
    container = select('.container'),
    spacer = 4;

TweenMax.set('svg', {
  visibility: 'visible'
})

CustomEase.create('ripple1', 'M0,0 C0.388,0.228 0.3,0.852 0.458,1 0.65,1.18 0.586,0.094 1,0');
CustomWiggle.create('wiggle1', {wiggles:3, ease:'ripple1'})



TweenMax.set('.taj', {
  scale:7,
 x:278,
 y:120
})
var linesTl = new TimelineMax();

function makeLines(){
 
 for(var i = 0; i<40; i++){
  var line = select('.myLine').cloneNode(true);
  container.appendChild(line);
  
  TweenMax.set(line, {
   scaleX: Math.sin(i/11.6),
   transformOrigin:'50% 50%',
   x:0,
   y:303 + (i*spacer),
   alpha:0
  })
 }
 
 linesTl.staggerTo('.myLine', 4.2, {
 scaleX:0.4,
 repeat:-1,
 ease:'wiggle1'
},0.25);

linesTl.seek(1000); 
}
makeLines();





var buildTl = new TimelineMax();
var mainTl = new TimelineMax({delay:0.8});


buildTl.from(['.outline','.maskCircle'], 1, {
 scale:0,
 transformOrigin:'50% 50%'
})
 .from('.water', 1, {
 scaleX:0,
 transformOrigin:'50% 50%'
},'-=1')
  .staggerFrom(['.botSemi', '.topSemi'], 1, {
 cycle:{
  y:[260, -260]
 },
 ease:Sine.easeOut
},0.2,'-=1')

 .from('.taj', 0.5, {
 y:400,
 ease:Expo.easeOut
},'-=0.36')

 .staggerTo(['.botGrad', '.topGrad'], 1, {
 alpha:1,
 ease:Power1.easeOut
},0.005)

.staggerTo('.container line', 1, {
 alpha:1,
 ease:Power2.easeOut 
},0.05)





mainTl.add(buildTl, 0);
//mainTl.add(linesTl, 0);

document.body.onclick = function(){
 
 mainTl.play(0);
}

              
            
!
999px

Console