背景图像未在IE中加载

时间:2013-12-26 08:27:08

标签: html css internet-explorer css3

以下是我的小提琴,我面临的唯一问题是我的背景图片不仅仅显示在Internet Explorer中。请告诉我如何解决这个问题。我尝试了很多但是失败了

FIDDLE

CODE

.header2 {
    background: #6cab26;
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), #5D5846;
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), -moz-radial-gradient(circle, #FFFFFF 0%, rgba(93,88,70,1) 100%);
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), -webkit-gradient(radial, center center, 0px, center center, 460, color-stop(0%, #FFFFFF), color-stop(100%, rgba(93,88,70,1)));
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), -webkit-radial-gradient(circle, #FFFFFF 0%, rgba(93,88,70,1) 100%);
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), -o-radial-gradient(circle, #FFFFFF 0%, rgba(93,88,70,1) 100%);
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), -ms-radial-gradient(circle, #FFFFFF 0%, rgba(93,88,70,1) 100%);
    background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg), radial-gradient(circle, #FFFFFF 0%, rgba(93,88,70,1) 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#b9b8b1', endColorstr='#5d5846', GradientType=1 ), progid:DXImageTransform.Microsoft.AlphaImageLoader(src="http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg" , sizingMethod='scale'); 
    background-position: center center;
    background-repeat: no-repeat;
    width:100%;
    height:210px;
    text-align: center;
    vertical-align:middle !important;
    color: red;

}

2 个答案:

答案 0 :(得分:1)

只需删除

即可
background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg) #5D5846; 

并添加

background-image: url(http://freepsdgraphics.net/wp-content/uploads/2012/04/free-web-header-download-550x172.jpg);

答案 1 :(得分:0)

您可以尝试使用也支持IE9的Ultimate CSS Gradient generator tool

只需将相关的css(包含渐变代码的css)复制到工具中,然后选中ie9支持复选框。

另请注意,它声明为了让IE9支持它,您需要删除过滤器:

<!--[if gte IE 9]>
  <style type="text/css">
    .header2 {
       filter: none;
    }
  </style>
<![endif]-->