Is this right to apply gradient background to the body from a light shade of grey to white from bottom to top?
body {
background: -webkit-gradient(linear, bottom, top, from(#e7e7e7, to(#ffffff));
}
DEMO to support all capable browsers
body {
background-color: #ffffff;
background-image: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#999999));
background-image: -webkit-linear-gradient(top, #ffffff, #999999);
background-image: -moz-linear-gradient(top, #ffffff, #999999);
background-image: -o-linear-gradient(top, #ffffff, #999999);
background-image: linear-gradient(to bottom, #ffffff, #999999);
}
CSS3 Please might be useful
To Zoltan's solution, you could also add:
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#999999');
to support older IE browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With