Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does IE9 support CSS linear gradients?

With Chrome/Safari and Firefox there's the -webkit-gradient and -moz-linear-gradient properties. How can I do this same sort of thing with IE9?

like image 298
James Alexander Avatar asked Feb 10 '11 19:02

James Alexander


People also ask

What browsers support linear gradient?

Cross Browser Compatibility Solution For CSS Linear Gradient. All desktop browsers including Internet Explorer 11 and Microsoft Edge provide browser support for Linear CSS Gradients, meaning these CSS Gradients offer excellent cross browser compatibility.

Can you do gradients in CSS?

CSS defines three types of gradients: Linear Gradients (goes down/up/left/right/diagonally) Radial Gradients (defined by their center) Conic Gradients (rotated around a center point)

How do you add a linear gradient in fill CSS?

The linear-gradient() function sets a linear gradient as the background image. To create a linear gradient you must define at least two color stops. Color stops are the colors you want to render smooth transitions among. You can also set a starting point and a direction (or an angle) along with the gradient effect.

What does linear gradient to CSS?

linear-gradient() The linear-gradient() CSS function creates an image consisting of a progressive transition between two or more colors along a straight line. Its result is an object of the <gradient> data type, which is a special kind of <image> .


1 Answers

The best cross-browser solution is

background: #fff; background: -moz-linear-gradient(#fff, #000); background: -webkit-linear-gradient(#fff, #000); background: -o-linear-gradient(#fff, #000); background: -ms-linear-gradient(#fff, #000);/*For IE10*/ background: linear-gradient(#fff, #000); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffffff', endColorstr='#000000');/*For IE7-8-9*/  height: 1%;/*For IE7*/  
like image 152
goksel Avatar answered Sep 18 '22 11:09

goksel