您好,欢迎访问一九零五行业门户网

怎么实现背景色从中间往两边渐变?_html/css_WEB-ITnose

-webkit-linear-gradient( bottom,transparent ,#000 100%)
这样实现了背景色的渐变,希望实现背景色是中间深色,逐渐往上和往下变成透明,css该怎么写?
回复讨论(解决方案) filter: progid:dximagetransform.microsoft.gradient(gradienttype=0,startcolorstr=#fff,endcolorstr=#000); /*ie 6 7 8*/
background: -ms-linear-gradient(top, #fff,  #000);        /* ie 10 */
background:-moz-linear-gradient(top,#fff,#000);/*火狐*/
background:-webkit-gradient(linear, 0% 0%, 0% 100%,from(#fff), to(#000));/*谷歌*/
background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#000));      /* safari 4-5, chrome 1-9*/
background: -webkit-linear-gradient(top, #fff, #000);   /*safari5.1 chrome 10+*/
background: -o-linear-gradient(top, #fff, #000);  /*opera 11.10+*/
其它类似信息

推荐信息