【问题标题】:Why doesn't this gradient work on IE 9?为什么这个渐变在 IE 9 上不起作用?
【发布时间】:2013-07-23 14:19:09
【问题描述】:

CSS:

 background-image: linear-gradient(bottom, #000000 29%, #999999 65%);
    background-image: -o-linear-gradient(bottom, #000000 29%, #999999 65%);
    background-image: -moz-linear-gradient(bottom, #000000 29%, #999999 65%);
    background-image: -webkit-linear-gradient(bottom, #000000 29%, #999999 65%);
    background-image: -ms-linear-gradient(bottom, #000000 29%, #999999 65%);
    background-image: -webkit-gradient(linear,  left bottom,    left top,   color-stop(0.29, #000000),  color-stop(0.65, #999999));
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#999999');

为什么IE版本的渐变不起作用?我似乎找不到什么问题?

【问题讨论】:

    标签: internet-explorer css internet-explorer-9 gradient


    【解决方案1】:

    尝试设置 GradientType 属性:

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#000000', endColorstr='#999999', GradientType=0);
    

    【讨论】:

      【解决方案2】:

      试试

      filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#000000', endColorstr='#999999',GradientType=0 ); /* IE6-9 *
      
      background: -ms-linear-gradient(top, rgba(0,0,0,1) 0%,rgba(153,153,153,1) 100%); /* IE10+ */
      

      【讨论】:

        猜你喜欢
        • 2011-12-10
        • 2019-11-15
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-10-07
        • 1970-01-01
        • 2016-07-19
        • 1970-01-01
        相关资源
        最近更新 更多