Gradient not working in Chrome, but works in Firefox

I'm trying to use the webkit gradient tag for Chrome, but it doesn't work at all. I've tried it in Firefox with the background:-moz-linear-gradient(#000, #888); , and it works just fine.

However with background: -webkit-gradient(linear, from(#000), to(#888)); it doesn't work. Here's my bit of code:

   echo "<tr style='background:-moz-linear-gradient(#000, #888); background: -webkit-gradient(linear, from(#000), to(#888));'><td width='65'><img src='images/avatar/defaultuser.jpg' height='65' width='65'>";

The -webkit-gradient property is deprecated. Use the new gradient syntax:

 background: -webkit-linear-gradient(#000, #888);

使用colorzilla梯度发生器进行交叉浏览器渐变


Use this instead :

background: -webkit-linear-gradient(#000, #888);

-webkit-gradient was for Chrome v2 ...

链接地址: http://www.djcxy.com/p/28098.html

上一篇: 半径和背景梯度出血

下一篇: 渐变不适用于Chrome,但适用于Firefox