Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[兼容性] 41. IE6-7 图片下面有空隙的问题 #903

Open
qiilee opened this issue Jan 27, 2020 · 0 comments
Open

[兼容性] 41. IE6-7 图片下面有空隙的问题 #903

qiilee opened this issue Jan 27, 2020 · 0 comments

Comments

@qiilee
Copy link
Member

qiilee commented Jan 27, 2020

问题说明:
块元素中含有图片时,ie6-7 中会出现图片下有空隙

解决方法:
1、在源代码中让<div><img>在同一行
2、将图片转换为块级对象 display:block;
3、设置图片的垂直对齐方式 vertical-align:top/middle/bottom
4、改变父对象的属性,如果父对象的宽、高固定,图片大小随父对象而定,那么可以对父元素设置: overflow:hidden;
5、设置图片的浮动属性 float:left;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant