Internet Explorer 7 上图像的 CSS 问题

标签 css

.plus input[type="submit"] 
{
background: url("../Image/button_one.png") no-repeat;
border: medium none;
float: right;
height: 32px;
margin-right: 14px;
margin-top: 53px;
width: 32px;
}

我正在使用以下代码在图像上显示按钮,它适用于所有浏览器,但当涉及到 Internet Explorer 7 时,按钮会从图像中消失。

最佳答案

input[type="submit"]不支持 IE 7 和 IE8 see here 。最好上一个类。

此外,您正在以错误的方式编写 CSS。应该是这样的。工作 Demo .

 input.plus[type="submit"] 
{
background: url("http://lorempixel.com/60/30/") 0 0 no-repeat;
height: 32px;
width: auto;
}
input[type="submit"] 
{border:1px solid black;
width: 132px;}

关于Internet Explorer 7 上图像的 CSS 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23826463/

相关文章:

javascript - 自定义 CSS 不适用于带有 jQ​​uery 的 Body 元素

css - 如何在CSS中重复整个图像?

javascript - jQuery 变形插件。元素不适合行

html - css ~ 选择器不会将样式应用于所有目标元素(z-index 到下一个/上一个标签)

css - div背景半透明,不是内容?

javascript - 如何根据 Accordion slider 中的内容调整嵌套 div 的高度?

html - 如何在不同分辨率下保留所有元素 - HTML/CSS3

html - 如何将div垂直展开到窗口大小并垂直居中?

html - 文本区域标签的定位

css - 在 Compass Susy 中组合布局断点?