Created
January 2, 2019 18:35
-
-
Save mmh4560/fb4ca592449085a7a2a071b3309612cc to your computer and use it in GitHub Desktop.
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 id="f1_container"> | |
<div id="f1_card" class="shadow"> | |
<div class="front face"> | |
<img src="/images/Windows%20Logo.jpg"/> | |
</div> | |
<div class="back face center"> | |
<p>This is nice for exposing more information about an image.</p> | |
<p>Any content can go here.</p> | |
</div> | |
</div> | |
</div> | |
<style> | |
#f1_container { | |
position: relative; | |
margin: 10px auto; | |
width: 450px; | |
height: 281px; | |
z-index: 1; | |
} | |
#f1_container { | |
perspective: 1000; | |
} | |
#f1_card { | |
width: 100%; | |
height: 100%; | |
transform-style: preserve-3d; | |
transition: all 1.0s linear; | |
} | |
#f1_container:hover #f1_card { | |
transform: rotateY(180deg); | |
box-shadow: -5px 5px 5px #aaa; | |
} | |
.face { | |
position: absolute; | |
width: 100%; | |
height: 100%; | |
backface-visibility: hidden; | |
} | |
.face.back { | |
display: block; | |
transform: rotateY(180deg); | |
box-sizing: border-box; | |
padding: 10px; | |
color: white; | |
text-align: center; | |
background-color: #aaa; | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment