Home  >  Article  >  Web Front-end  >  当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose

当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:29:131056browse

<div class="brand"><img  src="./images/fp_110.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_111.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_112.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_113.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_114.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_116.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_117.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ><img  src="./images/fp_118.png" / alt="当把宽度设为25%时,其他浏览器正常,IE7图片会掉下来,有没有好的解决方法_html/css_WEB-ITnose" ></div>

.brand{	width: 100%;	overflow:hidden;	margin: 40px auto;}.brand img{	/* max-width: 200px; */	width: 25%;    height: 300px;	float:left;}


回复讨论(解决方案)

*{margin:0;padding:0;}
加这个试下

*{margin:0;padding:0;}
加这个试下

已经加了,这个应该是IE7对宽25%有误差的原因。

记得IE6用百分比宽度的话会有类似四舍五入的,IE7没遇到过。

.brand img{vertical-align:top}这样试一下

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn