Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linear gradient in Chrome and Safari browsers

I am having trouble showing a linear gradient in Safari and Chrome. In Firefox it shows up fine.

I am trying:

background: -webkit-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;   
background:    -moz-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;
background:     -ms-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;
background:      -o-linear-gradient(center top , #9E9E9E, #454545) repeat scroll 0 0 transparent;

Thanks you for your help.

like image 677
codelove Avatar asked Jul 27 '12 18:07

codelove


People also ask

Does Safari support linear gradient?

Safari supports two types of CSS gradients: linear and radial.

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 I use CSS linear gradient?

CSS Linear Gradients 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 is Webkit linear gradient?

First, -webkit-gradient uses a two-point syntax that lets you explicitly state where a linear gradient starts and ends. linear-gradient does away with this in favor of convenient box-filling behavior. If you really want the gradient to stop before the edges of the box, you can do so via color stop placement.


1 Answers

Try this - http://jsfiddle.net/fwkgM/1/

  background-color: #9e9e9e;
  background-image: linear-gradient(to bottom, #9e9e9e, #454545);

CSS3 Please

like image 59
Zoltan Toth Avatar answered Sep 19 '22 14:09

Zoltan Toth