【问题标题】:Linear gradient not working in Safari and Internet Explorer线性渐变在 Safari 和 Internet Explorer 中不起作用
【发布时间】:2015-06-04 13:40:29
【问题描述】:

我可以让下面的线性渐变显示在 Chrome 和 Firefox 上,但不能显示在 Safari 或 Internet Explorer 中。

谁能告诉我哪里出错了?

background: -moz-linear-gradient(left,  rgba(5,5,5,0) 48%, rgba(5,5,5,1) 49%, rgba(5,5,5,1) 51%, rgba(5,5,5,0) 52%, rgba(5,5,5,0) 54%);
background: -webkit-gradient(linear, left top, right top, color-stop(48%,rgba(5,5,5,0)), color-stop(49%,rgba(5,5,5,1)), color-stop(51%,rgba(5,5,5,1)), color-stop(52%,rgba(5,5,5,0)), color-stop(54%,rgba(5,5,5,0)));
background: -webkit-linear-gradient(left,  rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%);
background: -o-linear-gradient(left,  rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%);
background: -ms-linear-gradient(left,  rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%);
background:linear-gradient(to right,  rgba(5,5,5,0) 48%,rgba(5,5,5,1) 49%,rgba(5,5,5,1) 51%,rgba(5,5,5,0) 52%,rgba(5,5,5,0) 54%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00050505', endColorstr='#00050505',GradientType=1 );

(我在 Ubuntu 上使用 Wine 和 modern.ie virtualbox 测试 Safari,在后者上使用 IE)

【问题讨论】:

  • Wine (PlayOnLinux) 上的 Safari 5、Windows 上的 Safari 5.17、IE 10

标签: css internet-explorer safari linear-gradients


【解决方案1】:

这是一个很棒的工具,我用于所有渐变。我从来没有遇到过问题!抱歉,我无法弄清楚您的确切问题,但也许这会有所帮助。

http://www.colorzilla.com/gradient-editor/

【讨论】:

    【解决方案2】:

    尝试使用 -webkit-gradient: /* 你的渐变代码 */;

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-06-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多