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.

            
              <link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">

<header>
  <div class="container">
    <h1>
      <svg id="card_deck" xmlns="http://www.w3.org/2000/svg" viewBox="305.8 100.3 408.8 553.7"><path class="st0" d="M668.6 542h.8l-.8.3-11.9 5.1.4 5.1h17.7l-.5 6.7-5.7 1.6-5.7-1.6-.4-4h-5.1l.7 8 10.5 2.9 10.4-2.9 1.4-15.8h-11.8l12.3-5.4.4-5.1h-25.5l.4 5.1zM535.6 317.8h2.7l-2.7 1.2-40.4 17.3 1.5 17.2h60l-2 22.6-19.1 5.3h-.2l-19.2-5.1-1.3-13.8h-17.3l2.4 27.1 35.4 9.8h.2l35.3-9.8 4.6-53.3h-39.9l41.5-18.5 1.5-17.2h-86.5l1.6 17.2z"/><path class="card_2" d="M691.1 100.3H379.8c-12.9 0-23.4 10.5-23.4 23.4v454.6c0 12.9 10.5 23.4 23.4 23.4h311.3c12.9 0 23.4-10.5 23.4-23.4V123.8c0-12.9-10.5-23.5-23.4-23.5zM386.7 184l3.7-41.5 16.7-4.6 16.6 4.6 3.7 41.6h-40.7zm205.2 229.6l-56.5 15.7-56.4-15.6-12.6-140.9h138l-12.5 140.8zm93.3 156.7l-16.7 4.6-16.6-4.6-3.7-41.6h40.7l-3.7 41.6z"/><path class="st0" d="M407 170.7h-.8l.8-.4 11.9-5-.5-5.1h-17.7l.6-6.7 5.7-1.6 5.7 1.6.4 4h5.1l-.7-8-10.5-2.9-10.5 2.9-1.3 15.8H407l-12.3 5.4-.4 5.1h25.5l-.5-5.1zM373.8 613.8c-15.7 0-28.4-12.8-28.4-28.4V130.8c0-.7 0-1.5.1-2.2-8.6 3.5-14.7 11.9-14.7 21.7v454.6c0 12.9 10.5 23.4 23.4 23.4h311.3c9.8 0 18.2-6.1 21.7-14.6-.7.1-1.4.1-2.1.1H373.8zM348.8 639.5c-15.7 0-28.4-12.8-28.4-28.4V156.5c0-.7 0-1.5.1-2.2-8.6 3.5-14.7 11.9-14.7 21.7v454.6c0 12.9 10.5 23.4 23.4 23.4h311.3c9.8 0 18.2-6.1 21.7-14.6-.7.1-1.4.1-2.1.1H348.8z"/></svg>
      Card Deck Drop Down
    </h1>
    <p>A simple menu made fun! This "card deck dropdown" is a beautiful display of what can be achieved using some CSS3 transitions, a little JS, and some creative thinking!</p>
    <h2>Requires: <span class="css">CSS3</span> , <span class="js">JS</span> , <span class="heart">♥</span></h2>
  </div>
</header>

<div class="container">
			<div class="card-drop">
				<a class='toggle' href="#">
  					<i class='icon-suitcase'></i> 
					  <span class='label-active'>Everyting</span>
				</a>
				<ul>
					  <li class='active'>
						    <a data-label="Everyting" href="#"><i class='icon-suitcase'></i> Everyting</a>
					  </li>
					  <li>
    						<a data-label="Design" href="#"><i class='icon-magic'></i> Design</a>
					  </li>
  					<li >
    						<a data-label="UI-UX" href="#"><i class='icon-bolt'></i> UI-UX</a>
					  </li>
					  <li>
						    <a data-label="Print" href="#"><i class='icon-tint'></i> Print</a>
					  </li>
  					<li>
    						<a data-label="Photography" href="#"><i class='icon-camera-retro'></i> Phtography</a>
					  </li>
  <li>
    						<a data-label="Photography" href="#"><i class='icon-camera-retro'></i> Phtography</a>
  					</li>                  
				</ul>
			</div>
            
          
!
            
              //Author: Brady Sammons
//URL: www.bradysammons.com
@import "compass/reset";
@import "compass/css3";
@import url(https://fonts.googleapis.com/css?family=Roboto:300,500);

*{
	@include box-sizing(border-box);
}

// ////////////////////////////////////////////
// page Styling
// ////////////////////////////////////////////
body{
	background-color: #ecf0f1;
  font-family: 'Roboto', sans-serif;
	font-size: 1em;
  
}
.container{
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
}
header{
  padding: 3.5rem 10%;
  background-color: #fff;
  margin-bottom: 1.5rem;
  text-align: center;
  svg{
    max-width: 20px;
    display: inline-block;
    fill: #1abc9c;
     vertical-align: -2px;
  }
  h1, h2, p{
    color: #2c3e50;
    margin-bottom: 1rem;
  }
  h1{
    font-weight: 300;
    color: #1abc9c;
    letter-spacing: -0.1rem;
    font-size: 2rem;
    text-shadow:0 1px 0 rgba(255,255,255,.8);
  }
  h2{
    font-size: .8rem;
    margin-bottom: 0;
    span{
      font-weight: 300;
      display: inlie-block;
      padding: 0 8px;
      font-size: 80%;
      color: #fff;
      @include border-radius(4px);
      &.js{
        background-color: #E4A128;        
      }
      &.css{
        background-color: #0070BB;
      }
      &.heart{
        background-color: #EB304A;
      }
    }
  }
}
p{
  line-height:1.5;
  text-align: left;
  font-weight: 300;
  font-size: 1rem;
}

// ////////////////////////////////////////////
// Card Deck Styling
// ////////////////////////////////////////////
$primary: #3498db;
.card-drop{
	position: relative;
	margin: 0 auto;
	@include perspective(800px);
  background: rgba(0,0,0,.1);

  // style all links 
	a{
		display: block;
		width: 100%;
		padding:20px 0 20px 20px;
		height: 60px;
		text-decoration: none;
		color: darken($primary, 10%);
		background-color: #fafafa;
		border: 1px solid #ddd;
		@include transition(all .3s ease-out );
		i{
			display: inline-block;
			width: 20px;
		}
	}
  
  // specific stlye for the toggle link
	>a.toggle{
		position: relative;
		z-index: 100;
		@include backface-visibility(hidden);
		@include transform-style(preserve-3d);
		@include transform-origin(50%, 0%);
		@include transition(.1s linear);
		&:active{
			 @include rotateX(60deg);
      &:after{
        @include rotateX(180deg);
      }
		}
    &:before, 
    &:after{
      content: "";
      position: absolute;
    }
		&:before{
			right: 25px;
			top: 50%;
      margin-top: -2.5px;
      border-left: 6px solid transparent;
	    border-right: 6px solid transparent;
	    border-top: 6px solid rgba(0,0,0,.8);
		}
    &.active{
      &:before{
        transform: rotate(180deg);
       }
    }
	}
	ul{
		position: absolute;
		height: 100%;
		top: 0;
		display: block;
		width: 100%;
		li{
			margin: 0 auto;
			@include transition(all, .3s ease-out);
			position: absolute;
			top: 0;
			z-index: 0;
			width:100%;
      a{
        border-top: none;
      }
      a:hover{
			  background-color: lighten($primary, 5%);
			  color: lighten($primary, 44%);
		  }
			&.active{
				a{
					color: #fff;
					background-color: darken($primary, 5%);
					cursor: default;
				}
			}
			&.closed{
				a:hover{
					cursor: default;
					background-color: $primary;
				}
			}
		}
	}
}
            
          
!
            
              (function($){
  //Author: Brady Sammons
  //URL: www.bradysammons.com
	/* -------------------------------------------------------- */ 
	/*	//set Global variables
	/* -------------------------------------------------------- */ 
	var cards = $(".card-drop"),
		toggler = cards.find(".toggle"),
		links = cards.find("ul>li>a"),
		li = links.parent('li'),
		count = links.length,
		width = 100;

		//set z-Index of drop Items
		li.each(function(i){
			$(this).css("z-index" , count - i); //invert the index values
		});

		//set top margins & widths of li elements
		function setClosed(){
			li.each(function(index){
				 $(this).css("top" , index * 4)
				 		.css("width" , (width - index * .5) + "%" )
				 		.css("margin-left" , (index * .25) + "%" )
			});
			li.addClass('closed');
			toggler.removeClass("active");
		}
		setClosed();

	/* -------------------------------------------------------- */ 
	/*	Toggler Click handler
	/* -------------------------------------------------------- */ 
	toggler.on("mousedown" , function(){
		var $this = $(this); //cache $(this)
		//if the menu is active:
		if($this.is(".active")){
			setClosed();
		}else{
			//if the menu is un-active:
			$this.addClass("active");
			li.removeClass('closed');
			//set top margins
			li.each(function(index){
				 $(this).css("top" , 60 * (index + 1))
				 		.css("width" , "100%")
				 		.css("margin-left" , "0px");
			});
		}
	});

	/* -------------------------------------------------------- */ 
	/*	Links Click handler
	/* -------------------------------------------------------- */ 
	links.on("click" , function(e){
		var $this = $(this),
			label = $this.data("label");
			icon = $this.children("i").attr("class");
			
			li.removeClass('active');
		if($this.parent("li").is("active")){
			$this.parent('li').removeClass("active");
		}else{
			$this.parent("li").addClass("active");
		}
		toggler.children("span").text(label);
		toggler.children("i").removeClass().addClass(icon);
		setClosed();
		e.preventDefault;
	});

})(jQuery);
            
          
!
999px
Loading ..................

Console