CSS样式的按钮没有出现在IE8中,在其他浏览器中工作正常

时间:2014-07-09 01:13:22

标签: html css internet-explorer-8

有人可以看看以下代码并帮助我吗?这些是带有渐变的CSS样式按钮的文本链接,并且在Chrome,Safari,Firefox等中显示正常。不幸的是,我还需要在IE8中使用它。我确实尝试过PIE,但没有帮助。

感谢您查看此内容..

编辑:粘贴了错误的代码

CSS

.home-links {
  margin-top: -1px;
  margin-bottom: 45px;
  padding-bottom: 0px;
  padding-left: 0px;
  border: 3px solid #275da6;
  border-radius: 21px;
  background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.49) 6%, rgba(176, 192,     213, 0.29) 45%, rgba(10, 60, 125, 0.6) 87%);
  background-image: -o-linear-gradient(rgba(255, 255, 255, 0.49) 6%, rgba(176, 192, 213, 0.29) 45%, rgba(10, 60, 125, 0.6) 87%);
  background-image: linear-gradient(rgba(255, 255, 255, 0.49) 6%, rgba(176, 192, 213, 0.29) 45%, rgba(10, 60, 125, 0.6) 87%);
  background-size: auto;
}

.link-text {
  margin-top: 27px;
  margin-bottom: 26px;
  font-family:'Palatino Linotype', 'Book Antiqua', Palatino, serif;
  color: #bbd7fc;
  font-size: 16px;
  text-align: center;

 }

1 个答案:

答案 0 :(得分:0)

Bootstrap 2.x通过专有Gradient Filter在IE8中完成了渐变。例如,这是默认按钮(.btn)样式的过滤规则:

filter: progid:DXImageTransform.Microsoft.gradient(
    startColorstr='#ffffffff', 
    endColorstr='#ffe6e6e6', 
    GradientType=0);
但是,IE8并不支持rgba颜色,所以你必须接近等效的十六进制颜色。