css - 线性渐变在 Internet Explorer 9 和过滤器 : progid: is not working 中不起作用

标签 css

这已被问过几次,但他们已经有几年了,我想知道是否有更好的方法来解决这个问题。下面的 CSS:

.defaultButton {
  background: #90c8eb;
  background-image: -webkit-linear-gradient(top, #90c8eb, #0b85d1);
  background-image: -moz-linear-gradient(top, #90c8eb, #0b85d1);
  background-image: -ms-linear-gradient(top, #90c8eb, #0b85d1);
  background-image: -o-linear-gradient(top, #90c8eb, #0b85d1);
  background-image: linear-gradient(to bottom, #90c8eb, #0b85d1);
  -webkit-border-radius: 5;
  -moz-border-radius: 5;
  border-radius: 5px;
  font-family: Arial;
  color: #ffffff;
  font-size: 0.800em;
  font-weight: none;
  padding: 7px 14px 7px 16px;
  border: solid #6f92a8 1px;

}

linear-gradient 在 Chrome、Firefox 和 Safari 中工作正常,但在 IE 9 中不起作用。我找到了一些 css hack 网站,但它们没有工作。一个提到做:

background-image: -webkit-linear-gradient(top, #90c8eb/9, #0b85d1/9);

添加 /9 无效,\0/ 也无效。不确定我是否用错了它们,但到目前为止我没能成功。

最佳答案

你可以试试:

filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#90c8eb', endColorstr='#0b85d1', GradientType=0);

关于css - 线性渐变在 Internet Explorer 9 和过滤器 : progid: is not working 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35993278/

相关文章:

html - 如何在带阴影的表格上制作三 Angular 形?

html - ASP.NET MVC 中 CSS 中的根目录

HTML图片编码

objective-c - 如何在 Objective C 中添加 CSS

javascript - Google map 缩放和平移按钮未显示!这肯定不是 css 问题

css - Firefox 的 URL 建议弹出窗口的 CSS 是什么?

html - 如何在顶部覆盖内容的情况下填充背景图像的一半宽度?

javascript - 如何在标题末尾停止滚动并继续滚动内容?

html - 旋转元素相互重叠

css - 如果图像具有过渡效果,如何在图像上创建悬停框?