0

我的代码中附加了一张图片,但在 IE 中没有显示:

#upload_button{
background-image:url(images/upload.gif);
width:215px;
height:61px;
background-repeat:no-repeat;
border:none;
}
4

2 回答 2

1

IE7 和 IE8 不支持 CSS 属性“background-image”。

您需要将其替换为

“背景:透明网址();”

于 2013-02-12T06:37:45.377 回答
0

下面的代码在 IE 6/7/8 中完美运行。

#upload_button{
background-image:url(http://www.gravatar.com/avatar/41d7639adf8a1916fab202db8cb16273?s=32&d=identicon&r=PG);
width:215px;
height:61px;
background-repeat:no-repeat;
border:none;

}

  <input type="button" value="button" id="upload_button" />
于 2013-02-12T06:47:29.537 回答