Created
April 18, 2012 22:23
-
-
Save tylergaw/2417036 to your computer and use it in GitHub Desktop.
Centered Vertical line with CSS Gradient
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
/** | |
* Centered Vertical line with CSS Gradient | |
*/ | |
div { | |
background: #fff; | |
background: linear-gradient(180deg, transparent, #353535, transparent); | |
background-position: 50%; | |
background-repeat: repeat-y; | |
background-size: 1px auto; | |
} | |
/* Setup */ | |
div { | |
border: 1px solid #ccc; | |
height: 300px; | |
width: 90%; | |
} |
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></div> |
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
{"view":"split-vertical","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
background: linear-gradient(180deg, $line-color, $line-color);
it's the same without "dashed" problem when user zoom