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

为什么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;}

求各路大神指教、!


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


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


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

padding:0px;
margin:0px;

}


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

【热门文章】
【热门文章】