Use CSS to make the div background color gradient for browsers such as IE and chrome.
The code is as follows:
<style type= "Text/css" >
. jbkeleyi{
height:300px;
width:100px;
margin:0px Auto;
Background-image:-moz-linear-gradient (Top, #F00, #000);
Background-image:-webkit-gradient (linear, left top, left bottom, color-stop (0, #00FF00), Color-stop (1, #FF0000));
Filter:progid:DXImageTransform.Microsoft.gradient (startcolorstr= ' #00FF00 ', endcolorstr= ' #FF0000 ', gradienttype= ' 0 ');
}
</style>
<body>
CSS is a div color gradient: <br/>
<div class= "Jbkeleyi" > from green to red <br/><br/>keleyi.com</div>
:
Additional Browser-compatible code:
FILTER:progid:DXImageTransform.Microsoft.Gradient (gradienttype=0,startcolorstr= #b8c4cb, endcolorstr= #f6f6f8); /*ie*/
Background:-moz-linear-gradient (Top, #b8c4cb, #f6f6f8); */* Firefox */
Background:-webkit-gradient (linear, 0% 0, 0% 100%, from (#b8c4cb), to (#f6f6f8));/* Google */
Div+css Background Gradient color code example