【问题标题】:Smooth gradient in FF and IEFF 和 IE 中的平滑渐变
【发布时间】:2014-06-15 02:43:24
【问题描述】:

我有这些从#191919 到由http://colorzilla.com/gradient-editor/ 生成的透明的水平渐变线,但在 FireFox 29 和 IE 8 中它并不平滑。它在背景#191919 上。 (颜色深度问题?) 如果它不会是一个修复,那么它如何阻止这个浏览器?谢谢你。

/* IE9 SVG, needs conditional override of 'filter' to 'none' */
background: #191919;
background: -moz-linear-gradient(left, rgba(25,25,25,1) 0%, rgba(25,25,25,0) 100%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, right top, color-stop(0%,rgba(25,25,25,1)), color-stop(100%,rgba(25,25,25,0))); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(left, rgba(25,25,25,1) 0%,rgba(25,25,25,0) 100%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(left, rgba(25,25,25,1) 0%,rgba(25,25,25,0) 100%); /* Opera 11.10+ */
background: -ms-linear-gradient(left, rgba(25,25,25,1) 0%,rgba(25,25,25,0) 100%); /* IE10+ */
background: linear-gradient(to right, rgba(25,25,25,1) 0%,rgba(25,25,25,0) 100%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#191919', endColorstr='#19191900',GradientType=1 ); /* IE6-8 */

这是一个jsfiddle

【问题讨论】:

    标签: css internet-explorer firefox gradient smooth


    【解决方案1】:

    在 IE 8 上试试这个:

    -ms-filter: "progid:DXImageTransform.Microsoft.gradient( startColorstr='#191919', endColorstr='#191919',GradientType=1 )"; /* IE8 */
    

    你也必须包括这个:

    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#191919', endColorstr='#19191900',GradientType=1 );
    

    #191919 之后还有两个额外的零

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-10-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多