Created
September 16, 2014 23:41
-
-
Save milojennings/2ecb9b55f05153dd1301 to your computer and use it in GitHub Desktop.
awesome card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* awesome card */ | |
@list-color: #000000; | |
@front-card-back: #156AEA; | |
@front-p: #ffffff; | |
@back-p: #000000; | |
container { | |
-webkit-perspective: 1000; | |
} | |
.card-content { | |
padding: 10px; | |
} | |
.card-content h2 { | |
width: 180px; | |
font-size: 24px; | |
margin: 0; | |
} | |
.container { | |
width: 245px; | |
height: 370px; | |
float: left; | |
list-style: none; | |
margin-right: 10px; | |
margin-bottom: 10px; | |
position: relative; | |
cursor: pointer; | |
} | |
.container div { | |
width: 100%; | |
height: 100%; | |
position: absolute; | |
transition: all 0.5s; | |
/*hide the card that is behind (3D API)*/ | |
/*-webkit-backface-visibility: hidden;*/ | |
box-shadow: 0 6px 10px -5px rgba(0, 0, 0, 0.8); | |
-webkit-box-shadow: 0 6px 10px -5px rgba(0, 0, 0, 0.8); | |
border-radius: 5px; | |
overflow: hidden; | |
} | |
.container:hover .front { | |
/*z-index: 1;*/ | |
/*flip to back*/ | |
-webkit-transform: rotateY(180deg); | |
transform:rotateY(180deg); | |
} | |
.container:hover .back { | |
z-index: 2; | |
/*flip to front*/ | |
-webkit-transform: rotateY(0deg); | |
transform:rotateY(0deg); | |
opacity: 1; | |
} | |
.front { | |
background: @front-card-back; | |
background: transparent; | |
/* put "front" content above flipped back content */ | |
z-index: 1; | |
border: 0.1rem solid #168392; | |
} | |
.back { | |
-webkit-transform: rotateY(180deg); | |
transform: rotateY(180deg); | |
/*background-color: #000;*/ | |
color: #fff; | |
z-index: 3; | |
opacity: 0; | |
border: 0.15rem solid #168392; | |
} | |
.back-image { | |
/* background-image: url(https://s3.amazonaws.com/uploads.hipchat.com/78718/563748/0k1dsLHQbHpSOLe/card-person-2.png);*/ | |
opacity: 0.8; | |
background-color: #000; | |
position: relative; | |
z-index:2; | |
} | |
p { | |
margin: 0 auto; | |
display: block; | |
font-weight: 400; | |
position: relative; | |
font-size: .85em; | |
margin-top: 5rem; | |
width: 200px; | |
padding: 25px; | |
text-align: center; | |
} | |
.front p { | |
color: @front-p; | |
} | |
.back p { | |
color: @back-p; | |
color: #eee; | |
text-align: left; | |
} | |
span { | |
position: relative; | |
font-size: 1rem; | |
color: #168392; | |
} | |
.back p { | |
margin-left: 10px; | |
width: 180px; | |
} | |
img.card-icon { | |
display: flex; | |
align-items: center; | |
justify-content: center; | |
position: relative; | |
margin: 0 auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<div class='front'> | |
<img src="https://s3.amazonaws.com/uploads.hipchat.com/78718/563748/0k1dsLHQbHpSOLe/card-person-2.png"> | |
</div> | |
<div class='back'> | |
<div class='back-image'> | |
<div class="card-content"> | |
<p> | |
Dr. Landau, after pursuing extensive training, is an Accredited Member of the American Academy of Cosmetic Dentistry. | |
</p> | |
<span>LEARN MORE</span> | |
</div> | |
</div> | |
</div> | |
<!-- end content on card --> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split-vertical","fontsize":"70","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment