-
-
Save karlbright/2581983 to your computer and use it in GitHub Desktop.
Faded/Gradient Borders in Pure CSS
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
.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%; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment