Bestcomy.net blog

Coding for funny

导航

<input type="button">的style属性background-image无法在xp中正常显示

Posted on   bestcomy  阅读(10737)  评论(4)    收藏  举报

问题重现:

<input style="BACKGROUND-POSITION: center center; BACKGROUND-IMAGE: url(../Images/search.gif); WIDTH: 25px; BACKGROUND-REPEAT: no-repeat;" type="button">

在w2k中用ie浏览能够正常显示,而在wxp中用ie浏览则无法正常显示。

解决:

此问题通过咨询dudu得到解决,解决办法很简单,为style增加background-color属性,具体如下:
<input style="BACKGROUND-POSITION: center center; BACKGROUND-IMAGE: url(../Images/search.gif); BACKGROUND-COLOR: buttonface; WIDTH: 25px; BACKGROUND-REPEAT: no-repeat;" type="button">

目前还不知道是何原因,知道的朋友请指点一下,不知道的朋友更值得注意一下这个问题。

努力加载评论中...
点击右上角即可分享
微信分享提示