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

              
                <script type="text/javascript" src="//use.typekit.net/nts0xzw.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<div class="body">
  <div class="svg-container">
    <div class="box" id="s">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xml:space="preserve" x="0px" y="0px" viewBox="0 0 173.26 173.26" style="enable-background:new 0 0 173.26 173.26;">
        <g>
	        <path class="s" d="M130,150.1H43.3c-11.2,0-20.2-9.1-20.2-20.2v-14.4c0-3.2,2.6-5.8,5.8-5.8s5.8,2.6,5.8,5.8v14.4
	c0,4.8,3.9,8.7,8.7,8.7H130c4.8,0,8.7-3.9,8.7-8.7V101c0-4.8-3.9-8.7-8.7-8.7H43.3c-11.2,0-20.2-9.1-20.2-20.2
	c0-27.1,22-49,49.1-49.1H130c11.2,0,20.2,9.1,20.2,20.2v14.4c0,3.2-2.6,5.8-5.8,5.8c-3.2,0-5.8-2.6-5.8-5.8c0,0,0,0,0,0V43.3
	c0-4.8-3.9-8.7-8.7-8.7H72.2c-20.7,0-37.5,16.8-37.6,37.6c0,4.8,3.9,8.7,8.7,8.7H130c11.2,0,20.2,9.1,20.2,20.2V130
	C150.2,141.1,141.1,150.1,130,150.1z"/>
      </g>
      </svg>
    </div>
  
    <div class="box" id="q">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xml:space="preserve" x="0px" y="0px" viewBox="0 0 173.26 173.26" style="enable-background:new 0 0 173.26 173.26;">
        <g>
	        <path class="q" d="M101,138.6H43.2c-4.8,0-8.7-3.9-8.7-8.7V43.3c0-4.8,3.9-8.7,8.7-8.7h86.7c4.8,0,8.7,3.9,8.7,8.7v57.8
	c0,8.9-3.2,17.5-9,24.3L90.6,82.5l-0.4-0.4c-2.4-2.1-6.1-1.8-8.2,0.6c-2,2.3-1.8,5.8,0.4,7.9l90.8,82.6l-35.8-39.4
	c8.2-9,12.7-20.7,12.7-32.8V43.3c0-11.2-9.1-20.2-20.2-20.2H43.2C32.1,23,23,32.1,23,43.3v86.7c0,11.2,9.1,20.2,20.2,20.2H101
	c3.2,0,5.8-2.6,5.8-5.8S104.2,138.6,101,138.6L101,138.6z"/>
        </g>
      </svg>
    </div>
  
    <div class="box-uxd blue-uxd">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xml:space="preserve" x="0px" y="0px" viewBox="0 0 173.26 173.26" style="enable-background:new 0 0 173.26 173.26;">
        <g>
	        <path id="u" d="M101.1,150.1H72.2c-27.1,0-49.1-22-49.1-49.1V43.3c0-11.2,9.1-20.2,20.2-20.2c3.2,0,5.8,2.6,5.8,5.8
	c0,3.2-2.6,5.8-5.8,5.8c0,0,0,0,0,0c-4.8,0-8.7,3.9-8.7,8.7c0,0,0,0,0,0v57.8c0,20.7,16.8,37.5,37.6,37.6h28.9
	c20.7,0,37.5-16.8,37.6-37.6V28.8c0-3.2,2.6-5.8,5.8-5.8c3.2,0,5.8,2.6,5.8,5.8V101C150.2,128.1,128.2,150.1,101.1,150.1z"/>
        </g>
      </svg>
    </div>

    <div class="box-uxd blue-uxd" id="xa-flip">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xml:space="preserve" x="0px" y="0px" viewBox="0 -68 173.26 240" style="enable-background:new 0 0 173.26 280;">
        <g>
	        <path id="diamond" d="M24.7,24.7L47.8,4.3h77.7l23,20.4L86.6,86.5L24.7,24.7z M65.5,24.7h-38l59.1,59.1l59.2-59.1L108,24.6L86.6,83.8L65.5,24.7z
	 M87.4,75.6l18.1-50.9H67.6l18.1,50.9C86,76.4,87.2,76.4,87.4,75.6z M109.5,22.9h34L124.9,6.1L109.5,22.9z M69.3,22.9H104L86.6,6.1
	L69.3,22.9z M29.9,22.9h34L48.4,6.1L29.9,22.9z M66.5,22.9L84.1,6.1H51L66.5,22.9z M106.8,22.9l15.6-16.8H89.2L106.8,22.9z"/>
	        <path id="x" d="M94.8,86.6l53.7-53.7c2.3-2.3,2.3-5.9,0-8.2c-2.3-2.3-5.9-2.3-8.2,0L86.6,78.4L32.9,24.7c-2.3-2.3-5.9-2.3-8.2,0
	s-2.3,5.9,0,8.2l53.9,53.9l-78.7,86.5l86.5-78.7l44,44H69.7c-3.2,0-5.8,2.6-5.8,5.8s2.6,5.8,5.8,5.8h74.7c2.3,0,4.4-1.4,5.3-3.6
	c0.9-2.2,0.4-4.6-1.3-6.3L94.8,86.6z"/>
	        <path id="a" d="M129.9,23.1H43.4c-11.1,0-20.2,9-20.2,20.2v101c0,3.2,2.6,5.8,5.8,5.8c3.2,0,5.8-2.6,5.8-5.8V93h80.5c3.2,0,5.8-2.6,5.8-5.8
	s-2.6-5.8-5.8-5.8l0,0H34.7V43.3c0-4.8,3.9-8.6,8.7-8.7h86.5c4.8,0,8.6,3.9,8.6,8.7v101c0,3.2,2.6,5.8,5.8,5.8s5.8-2.6,5.8-5.8v-101
	C150.1,32.2,141,23.2,129.9,23.1z"/>
        </g>
      </svg>
    </div>
 
    <div class="box-uxd blue-uxd">
      <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/" xml:space="preserve" x="0px" y="0px" viewBox="0 0 173.26 173.26" style="enable-background:new 0 0 173.26 173.26;">
        <g>
	        <path id="d" d="M101.1,150.1H43.3c-11.2,0-20.2-9.1-20.2-20.2V57.7c0-3.2,2.6-5.8,5.8-5.8c3.2,0,5.8,2.6,5.8,5.8v72.2
	c0,4.8,3.9,8.7,8.7,8.7h57.8c20.7,0,37.5-16.8,37.6-37.6V72.1c0-20.7-16.8-37.5-37.6-37.6H29.5c-3.2,0-5.8-2.6-5.8-5.8
	c0-3.2,2.6-5.8,5.8-5.8c0,0,0,0,0,0h71.6c27.1,0,49.1,22,49.1,49.1V101C150.2,128.1,128.2,150.1,101.1,150.1z"/>
        </g>
      </svg>
    </div>
  </div>
  <div class ="main-content">
    <p>a supreme design collection of innovative experiences, elegant interactions, & insightful perspectives</p>
    <div class="button-container">
      <a href="#">
        <div class="button"> 
          <div id="joinButton">Join SQU<span id="x-a">X</span>D</div>
          <div id="simpleButton">Simple</div>
          <div id="qualityButton">Quality</div>
          <div id="uxdButton">user experience design</div>
        </div>
        <div id="joinButtonActive">Join SQUXD</div>
<!--         <img src="squxd.gif" alt="Join the SQUXD. Simple Quality User Experience Design" style="display: none;"/>  -->
       </a>
    </div>
  </div>
</div>
              
            
!

CSS

              
                @import url(https://fonts.googleapis.com/css?family=Kanit:400,200);

.body {
  margin: 0 auto;
  width: 100%;
}
.svg-container {
  margin: 0 auto;
  max-width: 750px;
  height: 0 auto;
  padding-top: 2%;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
.box {
  width: 22.59%;
  height: auto;
  padding-bottom: 2%;
  max-width: 50%;
  margin: 8.8% -1.3% 0 -1.3%;
  float: left;
  display: inline-block;
}
.main-content {
  margin: 0 auto;
  max-width: 750px;
}
.box-uxd {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  fill: #000000;
  width: 22.59%;
  height: auto;
  padding-bottom: 2%;
  max-width: 50%;
  margin: 8.8% -1.3% 0 -1.3%;
  float: left;
  display: inline-block;
}
.blue-uxd {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  fill: #000000;
  width: 22.59%;
  height: auto;
  padding-bottom: 2%;
  max-width: 50%;
  margin: 8.8% -1.3% 0 -1.3%;
  float: left;
  display: inline-block;
}
#xa-flip {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  margin: 0 -1.3% 0 -1.3%;
}
p {
  margin: 0;
  padding-bottom: 5.2%;
  display: block;
  text-align: center;
  font-family: kanit;
  font-size: 1em;
  font-weight: 200;
  letter-spacing: -0.15px;
}
.button-container {
  float: left;
  width: auto;
  margin: 0 25%;
  min-width: 50%;
  padding: 0;
  height: 60px;
  display: block;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 10px;
  position: relative;
}
.button {
  visibility: visible;
  width: 100%;
  margin: 0;
  padding: 0;
  height: 60px;
  line-height: 60px;
  background: #ffffff;
  border: #00bbd3;
  border-style: solid;
  border-width: 2px;
  display: block;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 10px;
  font-family: kanit;
  font-weight: 400;
  font-size: 1.2em;
  letter-spacing: 0.5px;
  color: #000000;
  text-decoration: none;
  text-transform: uppercase;
  text-align: center;
  -webkit-transition: all 0.1s;
  -moz-transition: all 0.1s;
  -o-transition: all 0.1s;
  transition: all 0.1s;
}
.button:hover {
  color: #FFFFFF;
  background: #00bbd3;
  border: #00bbd3;
  border-style: solid;
  border-width: 2px;
  display: block;
  letter-spacing: 0.5px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 10px;
  text-transform: uppercase;
}

a {
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}
#joinButton {
  visibility: visible;
}
#simpleButton {
  display: none;
}
#qualityButton {
  display: none;
}
#uxdButton {
  display: none;
}
#joinButtonActive {
  display: none;
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  height: 60px;
  line-height: 60px;
  background: #00bbd3;
  border: #00bbd3;
  border-style: solid;
  border-width: 2px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  border-bottom-left-radius: 10px;
  font-family: kanit;
  font-weight: 400;
  font-size: 1.2em;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  text-decoration: none;
  text-transform: uppercase;
  text-align: center;
  -webkit-transition: all 0.1s;
  -moz-transition: all 0.1s;
  -o-transition: all 0.1s;
  transition: all 0.1s;
}

/*------Mobile button size------*/
@media screen and (max-width: 767px) {
  .button-container {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    float: left;
    width: auto;
    margin: 0 auto;
    width: 100%;
    padding-top: 20%;
  }
  p {
  margin: 0;
  padding-bottom: 0;
  display: block;
  text-align: center;
  font-family: kanit;
  font-size: 1em;
  font-weight: 200;
  letter-spacing: -0.15px;
  }
}
              
            
!

JS

              
                TweenLite.set(".box-uxd, .blue-uxd, #xa-flip, #a", {visibility:"visible"});

// (var1) "X-A" TEXT SCRAMBLER
var textBtnTl = new TimelineMax({repeat:-1, delay:5});

textBtnTl.to("#x-a", 10, {scrambleText:{text:"X", chars:"XAXX", revealDelay:6, tweenLength:true, speed:0.01, ease:Linear.easeNone}});


// (var2) FLIP "X" TO "A" + Diamond UP
var tl = new TimelineMax({paused:true});

tl.to("#x", 0.125, {scaleX:0, transformOrigin:"58% 42%", ease: Linear.easeNone, delay: 0.03, smoothOrigin:true}, 0)
  .to("#diamond", 0.425, {ease:Elastic.easeOut.config(0.55, 0.85), yPercent:-83.5, fill:"#00bbd3", smoothOrigin:true}, "-=0.1")
  .from("#a", 0.125, {scaleX:0, transformOrigin:"58% 42%", ease:Linear.easeNone, delay: 0.03, smoothOrigin:true}, "-=0.25")

tl.timeScale(1.2);

$("#xa-flip, .button").hover(function(){
  tl.play();
},function(){
  tl.reverse();
})


//---(var3)---DIAMOND FLOAT/HOVER-------- 
var loop=1, diamondTl = new TimelineMax({repeat:-1});

diamondTl
  .to("#diamond",0.4, {y:"-=2px", smoothOrigin:true, ease:Power1.easeOut, opacity:0.75}, "-=0.35")
  .to("#diamond",0.35, {y:0, smoothOrigin:true, ease:Power1.easeOut, opacity:1}, "+=0.1");

diamondTl.paused(true)
  .add(function(){loop=0});
$("#xa-flip, .button").hover(function(){
  diamondTl.play();
},function(){
  diamondTl.pause();
  TweenLite.from("#diamond", 1, {fill:"#00bbd3", progress:0})
  TweenLite.to(diamondTl, 0.25, {progress:0})
})

// HOVER "S"Q"UXD" CHANGE COLOR/BUTTON TEXT
$("#s, #q, .blue-uxd:not(#diamond, #xa-flip)").hover(over, out);
function over(){
  TweenMax.to(this, 0.25, {fill:"#00bbd3"})
}
function out(){
  TweenMax.to(this, 2, {fill:"#000000"})
}

var joinButton = $(".button #joinButton"),
    joinButtonActive = $("#joinButtonActive"),
    sButton = $(".button #simpleButton"),
    qButton = $(".button #qualityButton"),
    uxdButton = $(".button #uxdButton"),
    button = $(".button"),
    uxd = $("#u, #x, #d");

$(function(){
    $("#s").hover(function(){
        joinButton.hide(),
        sButton.show();
    }, function(){
        sButton.hide(),
        joinButton.show();
    }),
    $("#q").hover(function(){
        joinButton.hide();
        qButton.show();
    }, function(){
        qButton.hide();
        joinButton.show();
    }),
    $(".box-uxd").hover(function(){
        joinButton.hide();
        uxdButton.show();
    }, function(){
        uxdButton.hide();
        joinButton.show();
    }),
    $(".blue-uxd:not(#diamond, #a)").hover(function(){
        TweenMax.to(uxd, 0.25, {fill:"#00bbd3", progress:0});
        joinButton.hide();
        uxdButton.show();
    }, function(){
        TweenMax.to(uxd, 2, {fill:"#000000", progress:0});
        uxdButton.hide();
        joinButton.show();
    }),
    $("#xa-flip").hover(function(){
        TweenMax.to(uxd, 0.25, {fill:"#000000", progress:0});
        button.hide();
        uxdButton.hide();
        joinButton.hide();
        joinButtonActive.show();
    }, function(){
        TweenMax.to(uxd, 0.25, {fill:"#000000", progress:0});
        joinButtonActive.hide();
        button.show();
        joinButton.show();
    });
});
TweenLite.render();
              
            
!
999px

Console