0

I'm using some of the bootstrap components in particular the button group. I want to be able to add gradients to IE. When I view it in IE8 it degrades to a solid background. I tried to set a style for IE

Right now .btn class is using this setup to color the background gradients.

  background-color: #F5F5F5;
  background-image: -moz-linear-gradient(center top , #FFFFFF, #E6E6E6);

Here is what I'm adding for IE but it doesn't seem to do anything.

.btn{
background: linear-gradient(to bottom, #ffffff 0%,#e6e6e6 100%); 
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#e6e6e6',GradientType=0 );
}
4

4 回答 4

1

在手册中偷看,colorstr论点似乎期望AARRGGBB符号。

颜色以#AARRGGBB 格式表示,其中AA 是alpha 十六进制值,RR 是红色十六进制值,GG 是绿色十六进制值,BB 是蓝色十六进制值。alpha 值控制对象的不透明度。alpha 值 00 是透明的,而 FF 值是不透明的。

所以试试

filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffffff',
endColorstr='#ffe6e6e6',GradientType=0 );
于 2012-07-03T20:31:54.713 回答
0

虽然您可以使用过滤器,但如果有纯色背景,IE 将使用它。(好吧,技术上不是,但效果是一样的)

因此,尝试删除背景颜色,看看是否有效。

于 2012-07-03T20:29:16.737 回答
0

好的,问题是我首先加载了 IE 样式表,而 bootstrap.css 中的背景颜色覆盖了它。感谢大家的所有建议。

于 2012-07-03T20:34:32.060 回答
0

您总是可以尝试覆盖透明 png,但请注意它在 IE6 中不起作用。

于 2012-07-03T20:13:57.023 回答