简体   繁体   English

Internet Explorer 8中带有背景图像的提交按钮

[英]submit button with background image in internet explorer 8

On this site , I have a search form whose submit button has a background image 此站点上 ,我有一个搜索表单,其提交按钮具有背景图片

在此输入图像描述

But when I view the site in IE8, the image doesn't appear. 但是当我在IE8中查看该站点时,该图像没有出现。

在此输入图像描述

Is there anything I can do to persuade IE8 to show the image (that doesn't cause it to disappear in other broswers)? 我有什么办法说服IE8显示图像(这不会使它在其他浏览器中消失)?

It appears that the image is present, but barely visible. 看起来图像存在,但几乎看不见。 Try setting the height and width of the input . 尝试设置input的高度和宽度。 This makes the image visible for me: 这使我的图像可见:

.searchform INPUT[type='submit'] {
    width: 18px;
    height: 18px;
}

I got it working in IE8 in this fiddle 我在这个小提琴中在IE8中工作

I didn't see anywhere in your code that the background image is actually set in IE8. 我没有在代码中看到背景图像实际上是在IE8中设置的。 It shows in Chrome. 它显示在Chrome中。 Are you using multiple style sheets based on browser? 您是否使用基于浏览器的多个样式表? Or browser specific rules in your styles? 或者样式中的浏览器特定规则?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM