【发布时间】:2013-09-10 19:19:46
【问题描述】:
我在 WordPress 网站中使用提交按钮。这是我的按钮 HTML:
<input class="greenbut" onclick="set_srch();" type="image" alt="Search" value="Search"/>
在style.css 我有:
.search_box .greenbut
{
width: 50px;
height: 19px;
text-align: center;
color: #333333;
line-height: 30px;
padding-top: 10px;
padding-right: 15px;
padding-bottom: 0px;
padding-left: 15px;
font-family: DroidSansRegular;
font-size: 13px;
margin-top: 31px;
margin-left: 0px !important;
float: left;
cursor: pointer;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
border-bottom-left-radius: 5px;
background-image: none;
background-attachment: scroll;
background-repeat: repeat;
background-position-x: 0px;
background-position-y: 0px;
background-size: auto;
background-origin: padding-box;
background-clip: border-box;
background-color: rgb(137, 206, 71);
}
在其他浏览器中没问题,但在 IE 中是这样的:
在 Chrome 和 Firefox 中看起来像这样:
如何解决 IE 问题?
【问题讨论】:
-
图片src在哪里?
-
我得到了修复,真的不明白为什么开发人员使用它
-
他使用 bg 颜色、文本进行搜索并且没有图像导致问题,即如何解决?
-
@putvande windows 7 默认。
-
这里真正的解决方案是在输入元素中添加一个
src属性。更好的解决方案是根据使用情况更改要提交的输入类型或按钮,并使用 CSS 直观地对其进行样式设置。
标签: html css wordpress internet-explorer