【问题标题】:Gradient not working on IE but works everywhere else渐变不适用于 IE,但在其他任何地方都可以使用
【发布时间】:2012-09-09 18:28:36
【问题描述】:

我的渐变适用于 Firefox、Opera、Safari 等,但不适用于 IE。

我的代码如下,谁能帮帮我:

background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #b49931), color-stop(0.5, #5E5E5E), color-stop(0.51, #707070), color-stop(1, #838383)); 
background-image: -moz-linear-gradient(center bottom, #b49931 0%, #5E5E5E 50%, #707070 51%, #838383 100%); //FF 
background-image: -ms-linear-gradient(center bottom, #b49931 0%, #5E5E5E 50%, #707070 51%, #838383 100%); //IE 
background-image: -0-linear-gradient(center bottom, #b49931 0%,#5E5E5E 50%, #707070 51%, #838383 100%); //opera

【问题讨论】:

  • 对于 Opera,应该是-o-linear-gradient。它不叫0pera
  • Internet Explorer 总是一个问题。让它死吧……
  • “不能在 IE 上工作,但可以在其他地方工作”这是网页设计中最常见的问题
  • IE8...所以根本没有办法解决这个问题?
  • 没有。只要他们仍然获得良好的体验,就不要让每个浏览器中的所有内容看起来都 100% 相同,这确实是可以的。使用纯色背景而不是渐变色会伤害 IE 用户吗?

标签: html css internet-explorer gradient


【解决方案1】:
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#cccccc', endColorstr='#000000');

【讨论】:

  • 很棒的作品。我如何获得 4 种颜色,例如:背景图像:-moz-linear-gradient(center bottom, #b49931 0%, #5E5E5E 50%, #707070 51%, #838383 100%); //FF
猜你喜欢
  • 1970-01-01
  • 2013-03-04
  • 1970-01-01
  • 1970-01-01
  • 2016-08-08
  • 1970-01-01
  • 2015-09-25
  • 2016-12-30
  • 1970-01-01
相关资源
最近更新 更多