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 is required to process package imports. If you need a different preprocessor remove all packages first.

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

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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <h4>DC MORPH BTNS v.1</h4>
Hover & click to select. <br> 
<a href="https://codepen.io/digitalcraft/pen/VYdrKj" target="_blank">v.2 »</a>

<div class="dc-morph-btns">
			 <ul>     
					  <li class="selected"><a href="#"></a><i class="icon-layers"></i><span>All</span></li>
					  <li><a href="#"></a> <i class="icon-camera"></i><span>Photos</span></li>
  <li><a href="#"></a><i class="icon-cog"></i><span>Settings</span></li>         
 				</ul>
		</div>


<!--Digital Craft logo -->  
<a class="dc-logo" href="http://digitalcraft.co" target="_blank"><svg version="1.1" id="digital-craft" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"width="43.43px" height="49.313px" viewBox="0 0 43.43 49.313" enable-background="new 0 0 43.43 49.313" xml:space="preserve"><polygon fill="#555555" points="29.127,21.537 14.302,21.537 7.594,28.243 12.535,33.189 21.715,24.009 30.892,33.189 35.836,28.243"/><polygon fill="#999999" points="34.529,17.905 25.492,17.905 21.715,14.126 17.937,17.905 8.9,17.905 8.9,20.078 34.529,20.078"/></svg></a>
              
            
!

CSS

              
                /* #Demo Styles*/
body {
 background: rgba(237,237,235,0.7);
 font: 14px/21px Monaco, sans-serif;
 color: #999;
 font-smoothing: antialiased;
 text-size-adjust: 100%;
}
a, a:visited{text-decoration:none;color:#FF805F}
h4{margin:0;color:#333;}

/* #DC Morph Buttons
=======================*/
.dc-morph-btns {
  position: absolute;
  left:50%;
  top:50%;
  transform: translateX(-50%) translateY(-50%);
	width:500px;
  height:150px;
	font-size: 1.4em; 
	line-height: 0.9em; 
	color: #444; 
	text-align: center;
}
.dc-morph-btns li {  
	position: relative;
	width: 70px;
	height: 70px;
	display: inline-block;
	margin-right: 30px;
	overflow: visible;

}
.dc-morph-btns li a {
	position: absolute;
	left: 0;
	top:0;
	z-index: 1;
	background: #fff;
	border: 1px solid #ccc;
	text-indent:0;
	display:inline-block;
	color:#888;
	font-size:12px;
	font-weight: 400;
	text-decoration:none;
	text-align:center;
	text-transform: uppercase;
	width: 70px;
	height:70px;
	transition: all 600ms cubic-bezier(0.190,1.000,0.220,1.000);
	box-sizing: content-box;
	border-radius: 50px;
	background-clip: padding-box;
}

.dc-morph-btns li a:hover {
	border: 1px solid #ccc;
	background-clip: padding-box;
	border-top-left-radius:40px;
	border-top-right-radius:2px;
	border-bottom-left-radius:40px;
	border-bottom-right-radius:40px;
	transform: rotate(-45deg);
}

.dc-morph-btns ul li i {
	position: absolute;
	width: 30px;
	left:50%;
	top:50%;
	margin: -13px 0 0 -18px;
	color: #8A999D;
	font-size: 1.4em;
	z-index: 2;
	pointer-events: none;
}

.dc-morph-btns ul li span {
	position: absolute;
	width: 80px;
	bottom: -30px;
	left:-5px;
	display: block;
	color: #fff;
	opacity:0;
	font-size: 0.7em;
	text-align: center;
	transition: all 0.5s;
}

.dc-morph-btns ul li:hover span {
	color: #888;
	opacity:1;
}

.dc-morph-btns ul li.selected span {
	color: #FF805F;
	opacity:1;
}

.dc-morph-btns ul li.selected:hover span {
	color: #FF805F;
	opacity:1;
}

.dc-morph-btns li.selected a{  
	border: 1px solid #FF805F;
	background-clip: padding-box;
	border-top-left-radius:40px;
	border-top-right-radius:2px;
	border-bottom-left-radius:40px;
	border-bottom-right-radius:40px;
	transform: rotate(-45deg);
}

.dc-morph-btns li.selected i{ 
	color: #FF805F;
}


.dc-logo {
  position: fixed;
  right: 10px;
  top: 10px;
}

.dc-logo:hover svg{
  transform-origin: 50% 50%;
  animation: arrow-spin 2.5s 0s cubic-bezier(0.165, 0.840, 0.440, 1.000) 1;
  }

 .dc-logo:hover:before {
  content:'\2764';
  padding: 6px;
  font: 10px/1 Monaco, sans-serif;
  font-size:10px;
  color: #00fffe;
  text-transform:uppercase;
  position: absolute;
  left: -68px;
  bottom: -30px;
  white-space: nowrap;
  z-index: 20px;
  box-shadow: 0px 0px 4px #999;
  background:#2a2e32;
}
.dc-logo:hover:after {
  content:'Digital Craft';
  padding: 6px;
  font: 10px/1 Monaco, sans-serif;
  font-size:10px;
  color: #6E6F71;
  text-transform:uppercase;
  position: absolute;
  right: 0;
  bottom: -30px;
  white-space: nowrap;
  z-index: 20px;
  box-shadow: 0px 0px 4px #999;
  background:#fff;
}

@keyframes arrow-spin {
  50% {
    transform: rotateY(360deg);
  }
}
              
            
!

JS

              
                
$(document).ready(function() {
    $('.dc-morph-btns li').on('click', function() {
      $('.dc-morph-btns li').removeClass("selected");
      $(this).toggleClass("selected"); 
    });

});
              
            
!
999px

Console