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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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

              
                <div class="navItem">
<svg id="alienHead" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<line y1="1" x1="1" x2="100" y2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="100" y1="99" y2="99" x2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="99" x2="99" y1="1" y2="100" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="1" y1="100" x2="1" y2="0" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<rect class="background" width="100" height="100" fill="#29abe2" />
<text transform="translate(9.39 92.34)" font-size="16">ABDUCTIONS</text>
<path d="M73.12,28.92C70.32,14.6,59.43,9.21,48.26,9.23S26.2,14.6,23.4,28.92A21.11,21.11,0,0,0,25,40.25c1.78,11.27,12.65,26.35,19.14,30a8.82,8.82,0,0,0,4.1,1.17,8.83,8.83,0,0,0,4.11-1.17c6.49-3.62,17.36-18.7,19.14-30A21.11,21.11,0,0,0,73.12,28.92ZM49.43,53.59a1.13,1.13,0,0,1,1.2.91,1.27,1.27,0,0,1-.12,1.57,1.13,1.13,0,0,1-1.2-.91A1.27,1.27,0,0,1,49.43,53.59Zm-3.54.91a1.13,1.13,0,0,1,1.2-.91,1.27,1.27,0,0,1,.12,1.57,1.13,1.13,0,0,1-1.2.91A1.27,1.27,0,0,1,45.89,54.51Zm-14-7.08c-3.25-1.21-5.53-4.1-4.34-7.77s4.8-5.66,8-4.45,11,8.79,9.8,12.46S35.13,48.65,31.87,47.43ZM51.36,63.17a7.27,7.27,0,0,1-6.2,0,0.59,0.59,0,0,1,.5-1.07,6.07,6.07,0,0,0,5.2,0A0.59,0.59,0,0,1,51.36,63.17ZM64.65,47.43c-3.25,1.21-12.31,3.92-13.51.24s6.55-11.25,9.8-12.46,6.85,0.78,8,4.45S67.9,46.22,64.65,47.43Z" fill="#1d1d1b"/>
</svg>
</div>

<div class="navItem">
<svg id="sightings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<line y1="1" x1="1" x2="100" y2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="100" y1="99" y2="99" x2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="99" x2="99" y1="1" y2="100" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="1" y1="100" x2="1" y2="0" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<rect class="background" width="100" height="100" fill="#29abe2" />
<text transform="translate(13.86 90.96)" font-size="16" >sightings</text>
<path d="M49.29,23A21.69,21.69,0,0,0,27.82,41.74a39.59,39.59,0,0,0,42.95,0A21.69,21.69,0,0,0,49.29,23ZM64.21,40.28a4.59,4.59,0,0,1-2.26.37c-0.38-4.5-4.51-11-9-13.46,4.39-.11,11.57,3.8,13.94,12.7A5.16,5.16,0,0,0,64.21,40.28Z" fill="#1d1d1b"/><path d="M72.53,43.48a1.06,1.06,0,0,1-.13.13,42,42,0,0,1-46.2,0,1.11,1.11,0,0,1-.13-0.13c-8.31,2.11-13.63,5.33-13.63,8.94,0,5.17,10.91,9.55,25.92,11a21.58,21.58,0,0,0,21.88,0c15-1.46,25.92-5.83,25.92-11C86.16,48.82,80.84,45.6,72.53,43.48ZM21,50.77c-2.33.9-4.54,1-4.93,0.28s1.18-2.08,3.51-3,4.54-1,4.93-.29S23.36,49.86,21,50.77Zm12,7c-1.49,1.51-3.71,2-4.87,1.22s-0.76-2.5.76-4,3.48-2.27,4.58-1.55S34.45,56.15,33,57.73ZM49.29,62.5a3,3,0,0,1-3.22-3.34,3.59,3.59,0,0,1,3.19-3.34,3.62,3.62,0,0,1,3.22,3.34A3,3,0,0,1,49.29,62.5Zm21.14-3.55c-1.17.79-3.38,0.29-4.87-1.22s-1.6-3.54-.47-4.3,3.12,0,4.58,1.55S71.57,58.19,70.43,58.95Zm12-7.9c-0.39.75-2.6,0.62-4.93-.28s-3.9-2.24-3.51-3,2.6-.62,4.93.29S82.87,50.31,82.48,51.05Z" fill="#1d1d1b"/><path d="M50.83,14a1.54,1.54,0,1,0-3.08,0A1.52,1.52,0,0,0,49,15.51l-0.82,5.67h2.24L49.6,15.51A1.52,1.52,0,0,0,50.83,14Z" fill="#1d1d1b"/>
</svg>
</div>

<div class="navItem">
<svg id="messages" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<line y1="1" x1="1" x2="100" y2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="100" y1="99" y2="99" x2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="99" x2="99" y1="1" y2="100" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="1" y1="100" x2="1" y2="0" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<rect class="background" width="100" height="100" fill="#29abe2" />
<text transform="translate(16.86 90.96)" font-size="16">messages</text>
<path d="M50.38,21.34l-17,8.8c2.14,3.08,7.13,3.77,11.55,1.47S51.69,24.86,50.38,21.34Zm-2.9,7.54a6.25,6.25,0,0,0,1-5.39l0.89-.57C50.11,24.81,49.33,27.15,47.48,28.89Z" fill="#1d1d1b"/><path d="M43.22,25.06l-2.53-2.14a0.64,0.64,0,0,0,.14-0.25A0.57,0.57,0,0,0,40.39,22a0.69,0.69,0,0,0-.79.47,0.57,0.57,0,0,0,.44.72,0.65,0.65,0,0,0,.24,0l0.31,3.28Z" fill="#1d1d1b"/><path d="M62.18,40.11l-8.87-3,0.3-.9,8.87,3Z" fill="#1d1d1b"/><path d="M54,37.07l-0.9-.3,3-8.87L57,28.2Z" fill="#1d1d1b"/><path d="M55,26.14l12.08-6,8,16.22-12.08,6Z" fill="#1d1d1b"/><path d="M68,19.74l12.08-6L88.1,30,76,36Z" fill="#1d1d1b"/><path d="M41,50.57l-0.9-.3,3-8.88L44,41.7Z" fill="#1d1d1b"/><path d="M43.54,42.26l-8.87-3,0.3-.9,8.87,3Z" fill="#1d1d1b"/><path d="M42.25,52.65l-12.08,6-8-16.22,12.08-6Z" fill="#1d1d1b"/><path d="M29.3,59L17.22,65l-8-16.22,12.08-6Z" fill="#1d1d1b"/><path d="M60.14,45L54.58,33.73a6,6,0,0,0-7.46-2.89l-0.8-1.62a1.12,1.12,0,0,0-1.49-.5l-2.33,1.15a1.11,1.11,0,0,0-.5,1.49L42.79,33a6,6,0,0,0-2.24,7.69l5.57,11.26a6,6,0,0,0,8,2.7L57.44,53A6,6,0,0,0,60.14,45Z" fill="#1d1d1b"/>
</svg>
</div>

<div class="navItem">
<svg id="galaxies" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
<line y1="1" x1="1" x2="100" y2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="100" y1="99" y2="99" x2="1" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="99" x2="99" y1="1" y2="100" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<line x1="1" y1="100" x2="1" y2="0" fill="none" stroke="#000" stroke-miterlimit="10" stroke-width="2"/>
<rect class="background" width="100" height="100" fill="#29abe2" />
<text transform="translate(18.86 90.96)" font-size="16" >galaxies</text>
<path d="M79.52,42.1a60.07,60.07,0,0,1-12.85,8.17A61.46,61.46,0,0,1,52,55.1c-4.84.89-9.24,1-12.78,0a11.73,11.73,0,0,1-7.15-4.78,10.7,10.7,0,0,0,1.65.82A12.38,12.38,0,0,0,37.12,53a20.92,20.92,0,0,0,7.17,1A47.6,47.6,0,0,0,61.4,49.77a48.69,48.69,0,0,0,14.48-9.54,24.1,24.1,0,0,0,4.19-5.44,13.13,13.13,0,0,0,1.56-5.07,9.13,9.13,0,0,0-3.63-8c-2.54-2.12-6.34-3.59-10.79-4.34a47.79,47.79,0,0,0-14.48-.17,44.67,44.67,0,0,1,12.82,1.67A17.82,17.82,0,0,1,74,23.57a8.7,8.7,0,0,1,2.15,7.28c-0.43,2.8-2,5.72-4.91,8.58a40,40,0,0,1-11.42,7.65,45.41,45.41,0,0,1-7.26,2.62,42.67,42.67,0,0,0,6-3,32.55,32.55,0,0,0,6.47-5c3.47-3.54,5.27-7.24,5.21-10.47s-2.06-5.91-5.5-7.73a22.71,22.71,0,0,0-6.06-2.1,41.64,41.64,0,0,0-7.3-.79A56.5,56.5,0,0,0,35.73,22.3a49,49,0,0,0-14,5.69,29.19,29.19,0,0,0-9.37,8.8,41,41,0,0,1,10.74-7.63,53.86,53.86,0,0,1,26.4-5.41c4.29,0.21,8,1,10.69,2.57a9.44,9.44,0,0,1,3.45,3.12,14,14,0,0,0-4.72-2.26,26.54,26.54,0,0,0-7.23-.9,46.46,46.46,0,0,0-16,2.92,37.19,37.19,0,0,0-13.15,8,23.68,23.68,0,0,0-4.09,5.32,18.53,18.53,0,0,0-2,5.55,13.42,13.42,0,0,0,1.81,10.09,15.81,15.81,0,0,0,9.06,6.29,32.73,32.73,0,0,0,14.32.35,29,29,0,0,1-12.38-2.17,14,14,0,0,1-6.92-6.38,13,13,0,0,1-.81-8.79,17.86,17.86,0,0,1,5.17-8.87A32.25,32.25,0,0,1,37.28,31.9a40.08,40.08,0,0,1,4.57-1.5c-0.89.34-1.78,0.7-2.65,1.12l-0.42.22L38.11,32a29.79,29.79,0,0,0-6.34,4.22,19,19,0,0,0-4.21,5.23c-1.95,3.67-2.21,7.41-.83,10.56s4.47,5.59,8.81,6.82a27,27,0,0,0,7.37.83,46.76,46.76,0,0,0,8.39-1.05,66,66,0,0,0,17-6.34,55.58,55.58,0,0,0,13.43-9.76c3.35-3.46,5.45-7,5.88-10A33.06,33.06,0,0,1,79.52,42.1Z" fill="#1d1d1b"/>
</svg>
</div>

              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Oswald);

body {background: #828282;}

.navItem {
	width: 125px;
	height: 125px;
	float: left;
	cursor: pointer;
	margin-right: 6px;
}

.navItem svg {
	width: 125px;
	height: 125px;
  font-family:'Oswald';
  text-transform: uppercase;
}
              
            
!

JS

              
                TweenMax.set(".background",{fill:"#fff", transformOrigin:"center", scale:.90})

$(".navItem").each(createTheHover);

function createTheHover(i, element) {
  
var tl = new TimelineMax( { paused:true } );
var myLine = ($(this).find("line"));
var myText = ($(this).find("text"));
var mySquare = ($(this).find("rect"));
var myPath = ($(this).find("path"));

tl.fromTo(myLine, .25, {drawSVG:"0% 100%"},{drawSVG:"0% 0%", stroke:"#fff", ease:Linear.easeNone}, 0)
tl.fromTo(myLine, .25, {drawSVG:"100% 100%"},{drawSVG:"0% 100%", immediateRender:false, ease:Linear.easeNone})
tl.to(mySquare,.5, {fill:"#29abe2"},0)
tl.to([myText, myPath],.5, {fill:"#fff"},0);
	
$(element).on("mouseenter", playOver).on("mouseleave", playOut).on("mousedown", activated).on("mouseup", deactivated);
  

  function playOver() {
    tl.play();
  }

  function playOut() {
    tl.reverse();
  }

  function activated() {
    tl.progress(1);
	  TweenMax.set(mySquare, { fill:"#489e30", scale:1 } );
  }  

  function deactivated() {
	  TweenMax.set(mySquare, { clearProps:"fill", scale:.9 });
  }  
}
              
            
!
999px

Console