Skip to content

Instantly share code, notes, and snippets.

@charlesponti
Created October 2, 2014 17:16
Show Gist options
  • Save charlesponti/ac9bcbdcf9d17920bf0c to your computer and use it in GitHub Desktop.
Save charlesponti/ac9bcbdcf9d17920bf0c to your computer and use it in GitHub Desktop.
Google Card CSS
.card {
padding:1.5rem;
box-shadow:0 1px 2px #aaa;
background:white;
margin:0 1rem 1rem;
border-radius:3px;
user-select:none;
animation:fly-in-from-left .5s 1s ease both;
transform-origin:top left;
}
.card:nth-child(even){
animation-name:fly-in-from-right;
animation-delay:1.1s;
transform-origin:top right;
}
@keyframes fly-in-from-left {
from {
transform:translateY(15rem) rotate(15deg);
opacity:0;
}
}
@keyframes fly-in-from-right {
from {
transform:translateY(15rem) rotate(-15deg);
opacity:0;
}
}
.card:after {
position:absolute;
font-size:.9rem;
top:1.5rem;
right:1rem;
content:"i";
border:thin solid gray;
color:gray;
width:1rem;
line-height:1rem;
text-align:center;
border-radius:50%;
pointer-events:none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment