为什么IE和Google chrome表现不一致?

如题。请问是什么原因所致。 IE8下图片描述

Google chrome下
图片描述

html代码

<p>
    <input type="text" id="" value="" class="input-search" placeholder="搜索感兴趣的人和事" />
    <span class="search-button"><img src="img/search.png" width="26px" height="26px"/></span>
</p>

css代码

.input-search{width: 488px;height: 35px;border: none;font-size: 18px;float: left;}
.search-button{width: 40px;height: 37px;background: #fff;display: block;float: left;text-align: center;}
.search-button img{margin-top: 5px;}

求各路大神指教、!

阅读 5.9k
4 个回答

如果是原因的话不多说了,浏览器内核不一样肯定不一样,如果是解决方案,可以尝试一下normalize.css或者reset.css

浏览器内核不一样肯定不一致呀

在IE下input-txt padding-left: 1px;padding-right: 1px;,谢谢找到问题了了

建议css开始像这样写,清除所有浏览器内置的内边距和外边界。
*{

padding:0px;
margin:0px;

}

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题