我注意到标题的背景图片在ie6上根本没有显示。见http://goo.gl/YbW2xb

不想让我的网站在ie6上看起来完美,但是有快速解决方案吗?

非常感谢,

CSS:

header {
position: relative;
  width: 100%;
  height: 600px;
  margin-right: auto;
  margin-left: auto;
  background-size: 100% 100%, cover;
  background-color: rgb(222, 222, 222);
}

.wrapper-3 header {
  background-image: -webkit-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:    -moz-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:      -o-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:     -ms-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:         linear-gradient(359deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-position: 0% 0%, center center;
  opacity: 0.95;
}


的HTML

<div class="wrapper wrapper-3 clearfix">
    <header class="clearfix">
</header>
</div>

最佳答案

尝试这个。以此替换您的CSS。加

.wrapper-3 header {
  background-image:url('../images/.jpg'); /*add this for IE*/

  background-image: -webkit-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:    -moz-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:      -o-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:     -ms-linear-gradient(91deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-image:         linear-gradient(359deg, rgba(255, 255, 255, 0.23) 0%, rgba(0, 0, 0, 0) 100%), url('../images/.jpg');
  background-position: 0% 0%, center center;
  opacity: 0.95;
}

关于html - header 背景图片未显示在ie6上,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24490082/

10-09 15:16