Created
March 28, 2012 04:23
-
-
Save htmlr/2223606 to your computer and use it in GitHub Desktop.
Webkit CSS3 Reflection with Box Shadow
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
/** | |
* CSS 3 Reflection with Box Shadow | |
*/ | |
figure { | |
position:relative; | |
display:block; | |
width:96px; | |
} | |
figure img { | |
display:block; | |
position:relative; | |
z-index:0; | |
-webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(0.5, transparent), to(white)); | |
} | |
figure:after { | |
position:absolute; | |
top:0; | |
bottom:0; | |
left: 0; | |
right: 0; | |
content: ""; | |
z-index: 1; | |
background:transparent; | |
-webkit-box-shadow: inset 0 0 10px #000000; | |
} |
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
<figure><img src="https://lh5.googleusercontent.com/-E091xDYZfy8/AAAAAAAAAAI/AAAAAAAAAAA/7ghMV2NsSjk/s96-c/photo.jpg" width="96" height="96" alt="(photo)" /></figure> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment