Created
December 30, 2016 07:04
-
-
Save ron4stoppable/df2a4ec2e49f00761e8f27e97132889b to your computer and use it in GitHub Desktop.
border (frame) overlay and inset on image
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.ie-container { | |
display: inline-block; | |
position: relative; | |
} | |
div.ie-container:before { | |
display: block; | |
content: ''; | |
position: absolute; | |
top: 4px; | |
right: 4px; | |
bottom: 4px; | |
left: 4px; | |
border: 1px solid white; | |
} | |
img { | |
vertical-align: middle; /* optional */ | |
} |
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
// border(frame) overlay image | |
// not compatiable under IE10 | |
img { | |
outline: 1px solid white; | |
outline-offset: -4px; | |
} |
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="std"> | |
<img src="//lorempixel.com/200/200" /> | |
</div> | |
<div id="comp"> | |
<div class="ie-container"><img src="//lorempixel.com/200/200" /></div> | |
</div> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment