CSS
figure {
width: 200px;
height: 60px;
cursor: pointer;
perspective: 500px;
}
figure div {
height: 100%;
transform-style: preserve-3d;
transition: 0.25s;
}
figure:hover div {
transform: rotateX(-90deg);
}
span {
width: 100%;
height: 100%;
position: absolute;
box-sizing: border-box;
border: 5px solid #fff;
font-family: 'Source Sans Pro',sans-serif;
line-height: 50px;
font-size: 17pt;
text-align: center;
text-transform: uppercase;
}
span:nth-child(1) {
color: #fff;
transform: translate3d(0, 0, 30px);
}
span:nth-child(2) {
color: #333;
background: #fff;
transform: rotateX(90deg) translate3d(0, 0, 30px);
}
body {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
margin: 0;
}
html {
height: 100%;
width: 100%;
background: url(http://static.simpledesktops.com/uploads/desktops/2015/11/18/garlic_siracha.png) no-repeat center;
background-size: cover;
}