Created
October 2, 2014 17:16
-
-
Save charlesponti/ac9bcbdcf9d17920bf0c to your computer and use it in GitHub Desktop.
Google Card CSS
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
.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