Created
May 2, 2012 20:44
-
-
Save nrrrdcore/2580330 to your computer and use it in GitHub Desktop.
Faded/Gradient Borders in Pure CSS
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-container { | |
width: 28%; /* border will be on the left on this container */ | |
float: right; | |
overflow: hidden; /* only needed if floating container */ | |
min-height: 600px; /* static height if you want your container to be taller than its content */ | |
-moz-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF; | |
-webkit-box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF; | |
box-shadow: inset 15px 0 5px -16px rgba(0,0,0,.1), -1px 0 0 #FFF; | |
border-width: 0 0 0 1px; | |
-webkit-border-image: | |
-webkit-gradient(linear, 0 100%, 0 0, from(rgba(0,0,0,.09)), to(rgba(0,0,0,0))) 1 100%; | |
-webkit-border-image: | |
-webkit-linear-gradient(top, rgba(0,0,0,.09), rgba(0,0,0,0)) 1 100%; | |
-moz-border-image: | |
-moz-linear-gradient(top, rgba(0,0,0,.09), rgba(0,0,0,0)) 1 100%; | |
} |
Yeah—this is pretty awesome. Thanks
Love it @shpoonj!
Thanks you guys!
I forked this one and made a Compass mixin out if it too, but it needs some work and it's not compatible with my browser. Here's another take on the same idea, it's a hack but should be more compatible. 😁
its crossbrowsered?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Do you have a viewable demo?