Created
May 22, 2013 13:52
-
-
Save chiragchamoli/5627685 to your computer and use it in GitHub Desktop.
Google Card UI
This file contains 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
body { | |
background: #f3f3f3; | |
} | |
.card { | |
background: url(http://i.imgur.com/wpb9BKE.jpg) center center white; | |
width: 350px; | |
height: 303px; | |
box-shadow: 0 1px 2px rgba(0,0,0,0.5); | |
border-radius: 3px 3px; | |
margin: 0 auto 10px; | |
-webkit-transition: all 400ms ease; | |
-moz-transition: all 400ms ease; | |
-o-transition: all 400ms ease; | |
transition: all 400ms ease; | |
-webkit-transform: translate3d(0px, 100px, 0) rotateX(-30deg) scale(1.25, 1.25); | |
-moz-transform: translate3d(0px, 100px, 0) rotateX(-30deg) scale(1.25, 1.25); | |
transform: translate3d(0px, 100px, 0) rotateX(-30deg) scale(1.25, 1.25); | |
opacity: 0; | |
} | |
.card.appeared{ | |
-webkit-transform: translate3d(0px, 0px, 0px) rotateX(0) scale(1, 1); | |
-moz-transform: translate3d(0px, 0px, 0px) rotateX(0) scale(1, 1); | |
transform: translate3d(0px, 0px, 0px) rotateX(0) scale(1, 1); | |
opacity: 1; | |
} |
This file contains 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="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> | |
<div class="card"> | |
</div> |
This file contains 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
$(function() { | |
$(document.body).on('appear', '.card', function(e, $affected) { | |
// this code is executed for each appeared element | |
$(this).addClass("appeared"); | |
}); | |
$('.card').appear({force_process: true}); | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also see https://gist.github.com/eLindemann/5287591