html - ie 中的输入/按钮问题

标签 html css internet-explorer cross-browser

由于某些原因,我的搜索框在 ie 中显示不正确。搜索框根本不可见,按钮位于不应该出现的 Angular 落。 这是我的 HTML:

<div class="searchbox">
<form action="?" method="get">
    <input type="text" placeholder="Search Modern Spaces" />
    <button type="submit" value="submit" />
 </form>
</div><!--searchBoxOne-->

还有 CSS:

.searchbox input {
color: #b0b0b0;
width: 430px;
height: 28px;
margin-top: 32px;
padding: 10px 5px;
float: left;    
font-size: 20px;
border: 0;
border-radius: 4px 4px 4px 4px; 
box-shadow: inset 0 0 6px #7b7a7a;     
}

.searchbox button{
overflow: visible;
position: relative;
margin: 39px 0 0 -40px;
border: 0;
padding: 0;
cursor: pointer;
height: 40px;
width: 36px;
background:url(../images/srch_button.png) no-repeat;

}

关于如何解决这个问题的任何想法?感谢您的帮助。

最佳答案

这样试试

<div class="searchbox">
<form action="?" method="get">
<input type="text" placeholder="Search Modern Spaces" />
<button>Submit</button>
</form>
</div><!--searchBoxOne-->

或者用老方法代替<button type="submit" value="submit" />插入这个

<input type='submit' value='submit' />

关于html - ie 中的输入/按钮问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12081781/

相关文章:

javascript - 使用 jquery 或其他工具根据 URL 加载不同的 css 文件

javascript - 在保留滚动的同时禁用滚动条

javascript - 强制 Internet Explorer 忽略缓存的文件

javascript - ajax ie跨浏览器activexobject问题

css - 与-webkit-filter : blur and not solid edges (works with filter: blur)战斗

html - 最大宽度不适用于 IE 11

jquery - 动态生成的 html 上的 z-index 元素

javascript - 如果绑定(bind),Bootstrap CSS table-striped 不能与 knockout 一起使用

html - 固定最大高度时的 CSS 自动列数

html - 悬停粗体移动我的 li 链接