我的代码中附加了一张图片,但在 IE 中没有显示:
#upload_button{
background-image:url(images/upload.gif);
width:215px;
height:61px;
background-repeat:no-repeat;
border:none;
}
我的代码中附加了一张图片,但在 IE 中没有显示:
#upload_button{
background-image:url(images/upload.gif);
width:215px;
height:61px;
background-repeat:no-repeat;
border:none;
}
IE7 和 IE8 不支持 CSS 属性“background-image”。
您需要将其替换为
“背景:透明网址();”
下面的代码在 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" />