ie6下input type="button",button里面设的背景图片,就是不显示?

           在ie7,8,9,firefox,chrome都正常显示的图片,到了ie6下没了,查了资料,找到了解决方案,但因为什么还是没闹明白,记录下来,下次再碰到就这么解决。

           在IE6中,当输入的文字无限长时,此背景图片就会自动消失,出现BUG。
    因此,解决的方法是:在input外加一个div包裹起这个文本框,将背景图片text.jpg放在div中,就可以解决。
    html代码如下:

       <div class="input_box"> <input type="text" name="textfield" id="textfield1" />    </div>


css为:
#textfield1{ border:0; background:none;}  //将原来默认的边框跟默认的背景去掉
.input_box{ 164px; height:24px; background:url(../images/text.jpg) no-repeat;} //背景图片放在此包裹的div中
 
 
 
          就是在原来的input外套一层div,然后把背景图片的class写在里面。
原文地址:https://www.cnblogs.com/lans/p/2446132.html