written by Shannon Lynd on Friday, July 26, 2013
The HTML
The CSS
#gradient_bg_top_to_bottom {
/* for older browsers - use an repeating background image */
background-color: #1a82f7;
background:
url(images/linear_bg_2.png);
background-repeat: repeat-x;
/* For Safari 4-5,
Chrome 1-9 */
background: -webkit-gradient(linear, 0% 0%, 0% 100%,
from(#1a82f7), to(#2F2727));
/* For Safari 5.1, Chrome 10+ */
background:
-webkit-linear-gradient(top, #2F2727, #1a82f7);
/* For Firefox 3.6+ */
background: -moz-linear-gradient(top, #2F2727, #1a82f7);
/* For IE 10 */
background: -ms-linear-gradient(top, #2F2727, #1a82f7);
/* For Opera 11.10+
*/
background: -o-linear-gradient(top, #2F2727, #1a82f7); }
The Example