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

              
                <div id="wrapper">
  <div class="spin45" id="inShade"></div><!--END inShade-->
  <div id="base">

    <div class="page" id="leftPage">
      <div class="margin">
        <span class="line shortLine" id="line1"></span>
        <span class="line" id="line2"></span>
        <span class="line" id="line3"></span>
        <span class="line" id="line4"></span>
        <span class="line" id="line5"></span>
        <span class="line" id="line6"></span>
        <span class="line shortLine" id="line7"></span>
      </div><!--END margin-->
    </div><!--END leftPage-->

    <div class="page" id="rightPage">
      <div class="margin">
        <span class="line" id="line8"></span>
        <span class="line" id="line9"></span>
        <span class="line" id="line10"></span>
        <span class="line" id="line11"></span>
        <span class="line" id="line12"></span>
        <span class="line" id="line13"></span>
        <span class="line shortLine" id="line14"></span>-->
      </div><!--END margin-->
    </div><!--END rightPage-->
    <div id="deckShadow"></div><!--END deckShadow-->
    <div id="deck">
      <div class="card" id="blackCard2">
        <p class="cardLabel black">A</p>
      </div><!--END blackCard2-->
      <div class="card" id="blackCard1">
        <p class="cardLabel black">A</p>
      </div><!--END blackCard1-->
      <div class="card" id="redCard">
        <p class="cardLabel red">A</p>
      </div><!--END redCard-->
      <div class="card" id="heartCard">
        <p class="cardLabel red">A</p>
        <div id="heart"></div><!--END heart-->
      </div><!--END heartCard-->
    </div><!--END deck-->	

  </div><!--END base-->
</div><!--END wrapper-->
              
            
!

CSS

              
                *, *:before, *:after{
	box-sizing:border-box;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;
}
html{height:100%;border:0px; margin:0px; padding:0px;}
body{
	height:100%;font-family:Helvetica, Arial, sans-serif; 
	background: -webkit-linear-gradient(45deg, #7ba3a9, #37474e); /* For Safari 5.1 to 6.0 */
	background: -o-linear-gradient(45deg, #7ba3a9, #37474e); /* For Opera 11.1 to 12.0 */
	background: -moz-linear-gradient(45deg, #7ba3a9, #37474e); /* For Firefox 3.6 to 15 */
	background: linear-gradient(45deg, #7ba3a9, #37474e); /* Standard syntax (must be last) */
}	
div{position:relative; display:block;}

/* The Bases*/

#wrapper{
	margin-left:auto;
	margin-right:auto;
	top:4%;
	
	overflow:hidden;

	width:240px;
	height:240px;
	border-radius:30px;
	background:#58cfe5;
	background-image:linear-gradient(to top, #2197b5, #58cfe5 66%);
	border:1px solid #69aebb;
	box-shadow: 0px 2px 0px #156382, 0px 5px 0px #1b7292,
	15px 20px 40px #485e64;
}

#base{
	top:15px;
	margin-left:auto;
	margin-right:auto;

	overflow:visible;

	border:1px solid white;
	background:#fbefea;
	width:208px;
	height:208px;
	border-radius:20px;
	box-shadow: 0px 3px 0px #d9cabd;
}

/* Page alignments */

.page{
	width:104px;
	height:208px;
}

.margin{
	position:relative;
	top:34px;
	margin-left:auto;
	margin-right:auto;

	width:70px;
	height:140px;
}

#leftPage{
	position:absolute;
	top:0px;
	border-right:1px solid #e8ded9;
	float:left;
}

#rightPage{
	border-left:1px solid white;
	float:right;
}

/* The lines */
.line{
	position:absolute;
	
	background:#f1d2bf;
	box-shadow: inset 0px 1px 0px #ccb6a9, 0px 1px 0px white;
	border-radius: 6px;
	width:70px;
	height:12px;
}

.shortLine{
	width:56px;
}

#line1{}
#line2{top:20px;}
#line3{top:40px}
#line4{top:60px}
#line5{top:90px}
#line6{top:110px}
#line7{left:14px;top:130px}

#line8{}
#line9{top:20px;}
#line10{top:40px}
#line11{top:70px}
#line12{top:90px}
#line13{top:110px}
#line14{top:130px}

/*Shadow of the CardDeck*/

#deckShadow{
	position:absolute;
	left:97px;
	top:106px;
	
	width:125px;
	height:125px;
	opacity:0.2;
	
	background: -moz-linear-gradient(top,  rgba(40,40,40,1) 0%, rgba(167,167,167,0) 59%, rgba(255,255,255,0) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(40,40,40,1)), color-stop(59%,rgba(167,167,167,0)), color-stop(100%,rgba(255,255,255,0))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(40,40,40,1) 0%,rgba(167,167,167,0) 59%,rgba(255,255,255,0) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(40,40,40,1) 0%,rgba(167,167,167,0) 59%,rgba(255,255,255,0) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(40,40,40,1) 0%,rgba(167,167,167,0) 59%,rgba(255,255,255,0) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(40,40,40,1) 0%,rgba(167,167,167,0) 59%,rgba(255,255,255,0) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#282828', endColorstr='#00ffffff',GradientType=0 ); /* IE6-9 */
	
	-moz-transform: rotate(-45deg);
	-webkit-transform: rotate(-45deg);
	-o-transform: rotate(-45deg);
	-ms-transform: rotate(-45deg);
	transform: rotate(-45deg);

}

/* Cards*/
#deck{
	position:absolute;
	width:20px;
	height:20px;
	left:20px;
	top:60px;
}

.card{
	position:absolute;
	width:60px;
	height:90px;
	background-color:white;
	border-radius:6px;
	border:1px solid #eeeeee;
}

.cardLabel{
		position:absolute;
		left:8px;
		top:-5px;
		font-size:28px;
		font-weight:900;
		line-height:0px;
}
	.black{color:#6c6c6c;}
	.red{color:#ff6969}
	
#heartCard{
	top:10px;
	left:80px;
	transform-origin: right bottom;
	-moz-transform: rotate(35deg);
	-webkit-transform: rotate(35deg);
	-o-transform: rotate(35deg);
	-ms-transform: rotate(35deg);
	transform: rotate(35deg);
}

	#heart {
	top:56px;
	left:24px;
    position: relative;
}
		#heart:before,#heart:after {
		    position: absolute;
		    content: "";
		    left: 12px;
		    top: 0;
		    width: 12px;
		    height: 22px;
		    background: #ff6969;
		    -moz-border-radius: 20px 20px 0 0;
		    border-radius: 20px 20px 0 0;
		    -webkit-transform: rotate(-45deg);
		       -moz-transform: rotate(-45deg);
		        -ms-transform: rotate(-45deg);
		         -o-transform: rotate(-45deg);
		            transform: rotate(-45deg);
		    -webkit-transform-origin: 0 100%;
		       -moz-transform-origin: 0 100%;
		        -ms-transform-origin: 0 100%;
		         -o-transform-origin: 0 100%;
		            transform-origin: 0 100%;
		}
		#heart:after {
		    left: 0;
		    -webkit-transform: rotate(45deg);
		       -moz-transform: rotate(45deg);
		        -ms-transform: rotate(45deg);
		         -o-transform: rotate(45deg);
		            transform: rotate(45deg);
		    -webkit-transform-origin: 100% 100%;
		       -moz-transform-origin: 100% 100%;
		        -ms-transform-origin: 100% 100%;
		         -o-transform-origin: 100% 100%;
		            transform-origin :100% 100%;
		}

#redCard{
	left:60px;
	transform-origin: right bottom;
	-moz-transform: rotate(10deg);
	-webkit-transform: rotate(10deg);
	-o-transform: rotate(10deg);
	-ms-transform: rotate(10deg);
	transform: rotate(10deg);
}

#blackCard1{
	left:40px;
	transform-origin: right bottom;
	-moz-transform: rotate(-15deg);
	-webkit-transform: rotate(-15deg);
	-o-transform: rotate(-15deg);
	-ms-transform: rotate(-15deg);
	transform: rotate(-15deg);
}

#blackCard2{
	top:10px;
	left:20px;
	transform-origin: right bottom;
	-moz-transform: rotate(-35deg);
	-webkit-transform: rotate(-35deg);
	-o-transform: rotate(-35deg);
	-ms-transform: rotate(-35deg);
	transform: rotate(-35deg);

}
/* 45 deg SHADOW */ 

#inShade{
	position:absolute;
	top:80px;
	left:90px;
	
	opacity:0.25;
	
	background:#16617f;
	width:280px;
	height:300px;
}

.spin45{
	-moz-transform: rotate(-45deg);
	-webkit-transform: rotate(-45deg);
	-o-transform: rotate(-45deg);
	-ms-transform: rotate(-45deg);
	transform: rotate(-45deg);
}
              
            
!

JS

              
                /* Inspired by dribbble shot designed by Pasha Gonchar http://dribbble.com/shots/1404886-Poker-Book-App?list=show */

/* Personal exercise for learning. 
- faked 45deg shadow, so much fake.
- very messy and inefficient, a hackjob with the positioning overall. Stumped right now. 
- couldn't control transform property very well.
Feedback, advice most welcomd. @itsonlyher
*/
              
            
!
999px

Console