Created
September 27, 2014 23:42
-
-
Save d4tocchini/4abacb9a817341aef399 to your computer and use it in GitHub Desktop.
border-image magic
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
.imac { | |
/* apply imac image as fluid border image around figure */ | |
border-width: 34px 34px 163px 34px; | |
-moz-border-image: url("../img/border/border-mac-screen-800x608.png") 34 34 163 34 repeat; | |
-webkit-border-image: url("../img/border/border-mac-screen-800x608.png") 34 34 163 34 repeat; | |
-o-border-image: url("../img/border/border-mac-screen-800x608.png") 34 34 163 34 repeat; | |
border-image: url("../img/border/border-mac-screen-800x608.png") 34 34 163 34 fill repeat; | |
margin-left: -34px !important; | |
box-sizing: content-box !important; | |
} | |
.imac figure:before { | |
/* applies angled shine to atop of the figure w/in the imac */ | |
position: absolute; | |
right: -34; | |
left: 0; | |
top: -34; | |
bottom: 0; | |
content: ''; | |
background-image: url("../img/border/border-mac-screen-glare-800x608.png"); | |
background-position: top right; | |
background-repeat: no-repeat; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment