CSS radial gradient not working in Mozilla

时间:2015-06-30 13:37:35

标签: css css3 cross-browser radial-gradients

I have the following CSS code:

background: -webkit-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#7b7878), to(@white));
background: -moz-radial-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#7b7878), to(@white));
background: radial-gradient(radial, 50% 50%, 0, 50% 50%, 350, from(#7b7878), to(@white));

Which is responsible for the following styling:

enter image description here

It works in Chrome, but this is not working in Firefox and IE. What am I missing here??

1 个答案:

答案 0 :(得分:1)

使用此代码,这将适用于IE 10,google chrom 26.0,fire fox 16.0,opera 12.1和safari 6.1:

  width:100%;
  height:3px;
  background: -webkit-radial-gradient(#7B7878 1%, #BBBBBB 30%, #CCCCCC 40%, #FFF 70%);
  background: -o-radial-gradient(#7B7878 1%, #BBBBBB 30%, #CCCCCC 40%, #FFF 70%);
  background: -moz-radial-gradient(#7B7878 1%, #BBBBBB 30%, #CCCCCC 40%, #FFF 70%);
  background: radial-gradient(#7B7878 1%, #BBBBBB 30%, #CCCCCC 40%, #FFF 70%);

并根据需要提供相同的结果。