Created
August 12, 2013 14:24
-
-
Save dellermann/6211255 to your computer and use it in GitHub Desktop.
CSS linear gradients, simple and with color stops.
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
#foo { | |
background: #C5C5C5; | |
background: -ms-linear-gradient( | |
left, #F4F4F4 0, #F4F4F4 25px, #EEE 26px, #C5C5C5 43%, #C5C5C5 57%, | |
#EEE 974px, #F4F4F4 975px, #F4F4F4 100% | |
); | |
background: -moz-linear-gradient( | |
left, #F4F4F4 0, #F4F4F4 25px, #EEE 26px, #C5C5C5 43%, #C5C5C5 57%, | |
#EEE 974px, #F4F4F4 975px, #F4F4F4 100% | |
); | |
background: -o-linear-gradient( | |
left, #F4F4F4 0, #F4F4F4 25px, #EEE 26px, #C5C5C5 43%, #C5C5C5 57%, | |
#EEE 974px, #F4F4F4 975px, #F4F4F4 100% | |
); | |
background: -webkit-gradient( | |
linear, left top, right top, from(#F4F4F4), color-stop(25px, #F4F4F4), | |
color-stop(26px, #EEE), color-stop(43%, #C5C5C5), | |
color-stop(57%, #C5C5C5), color-stop(974px, #EEE), | |
color-stop(975px, #F4F4F4), to(#F4F4F4) | |
); | |
background: -webkit-linear-gradient( | |
left, #F4F4F4 0, #F4F4F4 25px, #EEE 26px, #C5C5C5 43%, #C5C5C5 57%, | |
#EEE 974px, #F4F4F4 975px, #F4F4F4 100% | |
); | |
background: linear-gradient( | |
left, #F4F4F4 0, #F4F4F4 25px, #EEE 26px, #C5C5C5 43%, #C5C5C5 57%, | |
#EEE 974px, #F4F4F4 975px, #F4F4F4 100% | |
); | |
} |
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
#main-menu { | |
background: #97b42d; | |
background: -khtml-gradient( | |
linear, left top, left bottom, from(#b0c639), to(#80a322) | |
); | |
background: -ms-linear-gradient(top, #b0c639, #80a322); | |
background: -moz-linear-gradient(top, #b0c639, #80a322); | |
background: -o-linear-gradient(top, #b0c639, #80a322); | |
background: -webkit-gradient( | |
linear, left top, left bottom, from(#b0c639), to(#80a322) | |
); | |
background: -webkit-linear-gradient(top, #b0c639, #80a322); | |
background: linear-gradient(top, #b0c639, #80a322); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment