|
|
|
@import url(http://fonts.googleapis.com/css?family=Bree+Serif); |
|
|
|
$duration: 300ms; |
|
$timing-fn: ease; |
|
$turquoise: #1ABC9C; |
|
$wet-asphalt: #34495E; |
|
$midnight-blue: #2C3E50; |
|
$clouds: #ECF0F1; |
|
|
|
/* the important bits */ |
|
li { |
|
perspective: 400px; |
|
} |
|
|
|
.info { |
|
// hide-initial-state |
|
transform: rotate3d(1,0,0, 90deg); |
|
|
|
width: 100%; |
|
height: 100%; |
|
padding: 20px; |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
border-radius: 4px; |
|
pointer-events: none; |
|
background-color: transparentize($turquoise, .1); |
|
} |
|
|
|
.in-top .info { |
|
transform-origin: 50% 0%; |
|
animation: in-top $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.in-right .info { |
|
transform-origin: 100% 0%; |
|
animation: in-right $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.in-bottom .info { |
|
transform-origin: 50% 100%; |
|
animation: in-bottom $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.in-left .info { |
|
transform-origin: 0% 0%; |
|
animation: in-left $duration $timing-fn 0ms 1 forwards; |
|
} |
|
|
|
.out-top .info { |
|
transform-origin: 50% 0%; |
|
animation: out-top $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.out-right .info { |
|
transform-origin: 100% 50%; |
|
animation: out-right $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.out-bottom .info { |
|
transform-origin: 50% 100%; |
|
animation: out-bottom $duration $timing-fn 0ms 1 forwards; |
|
} |
|
.out-left .info { |
|
transform-origin: 0% 0%; |
|
animation: out-left $duration $timing-fn 0ms 1 forwards; |
|
} |
|
|
|
@keyframes in-top { |
|
from {transform: rotate3d(-1,0,0, 90deg)} |
|
to {transform: rotate3d(0,0,0, 0deg)}} |
|
@keyframes in-right { |
|
from {transform: rotate3d(0,-1,0, 90deg)} |
|
to {transform: rotate3d(0,0,0, 0deg)}} |
|
@keyframes in-bottom { |
|
from {transform: rotate3d(1,0,0, 90deg)} |
|
to {transform: rotate3d(0,0,0, 0deg)}} |
|
@keyframes in-left { |
|
from {transform: rotate3d(0,1,0, 90deg)} |
|
to {transform: rotate3d(0,0,0, 0deg)}} |
|
|
|
@keyframes out-top { |
|
from {transform: rotate3d(0,0,0, 0deg)} |
|
to {transform: rotate3d(-1,0,0, 104deg)}} |
|
@keyframes out-right { |
|
from {transform: rotate3d(0,0,0, 0deg)} |
|
to {transform: rotate3d(0,-1,0, 104deg)}} |
|
@keyframes out-bottom { |
|
from {transform: rotate3d(0,0,0, 0deg)} |
|
to {transform: rotate3d(1,0,0, 104deg)}} |
|
@keyframes out-left { |
|
from {transform: rotate3d(0,0,0, 0deg)} |
|
to {transform: rotate3d(0,1,0, 104deg)}} |
|
|
|
|
|
/* you can ignore this ones */ |
|
ul { |
|
padding: 0; |
|
margin: 0 0 50px; |
|
|
|
&:after { |
|
content: ""; |
|
display: table; |
|
clear: both; |
|
} |
|
} |
|
|
|
li { |
|
position: relative; |
|
float: left; |
|
width: 200px; |
|
height: 200px; |
|
margin: 5px; |
|
padding: 0; |
|
list-style: none; |
|
|
|
a { |
|
display: inline-block; |
|
vertical-align: top; |
|
text-decoration: none; |
|
border-radius: 4px; |
|
} |
|
|
|
h3 { |
|
margin: 0; |
|
font-size: 16px; |
|
color: transparentize(#fff, .1); |
|
} |
|
|
|
p { |
|
font-size: 12px; |
|
line-height: 1.5; |
|
color: transparentize(#fff, .2); |
|
} |
|
|
|
.normal { |
|
width: 100%; |
|
height: 100%; |
|
background-color: $clouds; |
|
color: transparentize($wet-asphalt, .4); |
|
box-shadow: inset 0 2px 20px darken($clouds, 2); |
|
text-align: center; |
|
font-size: 50px; |
|
line-height: 200px; |
|
|
|
svg { |
|
pointer-events: none; |
|
width: 50px; |
|
path { |
|
fill: transparentize($wet-asphalt, .8); |
|
} |
|
} |
|
} |
|
} |
|
|
|
* { |
|
box-sizing: border-box; |
|
} |
|
|
|
body { |
|
background-color: #fff; |
|
} |
|
|
|
h1 { |
|
margin: 0 auto 5px; |
|
text-align: center; |
|
} |
|
|
|
h3 { |
|
font-family: 'Bree Serif', serif; |
|
} |
|
|
|
.container { |
|
width: 840px; |
|
margin: 0 auto; |
|
} |
|
|
|
header { |
|
font-family: 'Bree Serif', serif; |
|
text-align: center; |
|
margin: 50px 0 25px; |
|
color: $wet-asphalt; |
|
|
|
p { |
|
margin: 0; |
|
color: transparentize($wet-asphalt, .6); |
|
} |
|
} |