I have the following css code:
-webkit-gradient(linear, left bottom, left top, from(#5AE), to(#036));
Which displays the background very nicely in Chrome. Internet explorer just displays a white background. I tried applying CSS 3 pie, which didnt change anything.
Following is my css:
body {
behavior: url(css3pie/PIE.htc);
color: #000000;
font-family: Arial, Helvetica, sans-serif;
margin: 0px;
padding: 0px;
/*background:url("../image/bg.png") repeat scroll 0 0 transparent;*/
background: -webkit-gradient(linear, left bottom, left top, from(#5AE), to(#036));
}
Thanks
-webkit-gradient()is for webkit browsers only (Safari, Chrome, etc). This means it will not work in Firefox, Internet Explorer, Opera, or any other browser that does not support-webkit-gradient().If you want to get gradient in all modern browsers, try the following code:
Generated at http://projects.korrelboom.com/gradient-generator/:
Note: You don’t need any external JavaScript library to get gradients in IE. Simply use the CSS from above 😉 However, for your own sanity, I would suggest using a preprocessor such as LESS or SASS so you can have all of the browser-specific versions automatically generated.