Created
June 23, 2015 20:25
-
-
Save gearmobile/18fd70c2b7167ce05217 to your computer and use it in GitHub Desktop.
Shadow Over Image via Position Relative
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
HTML: | |
<div class="block1"> | |
<img src="images/charlize_theron_1.jpg" width="480" height="300"> | |
</div> | |
CSS: | |
.block1{ | |
box-shadow: inset 0 0 6px 4px rgba(0,0,0,.7); | |
width: 480px; | |
height: 300px; | |
} | |
.block1 img{ | |
position: relative; | |
z-index: -2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment