标签:line body logs 技术分享 char back overflow idt lang
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> div{ width: 100px; height: 100px; display: inline-block; background: red; } </style> </head> <body> <div>div1</div> <div>div2</div> <div>div3</div> </body> </html>
其他浏览器正常显示一行,IE6/7显示效果如下(不认display:inline-block)
可以通过下面方法解决
*display: inline;
*zoom: 1;
div{
width: 100px;
height: 100px;
display: inline-block;
background: red;
*display: inline;
*zoom: 1;
}
问题2:当设置高度为1px的时候,IE6显示高度为19px,可以通过overflow:hidden解决
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> div{ height: 1px; background: red; } </style> </head> <body> <div>div1</div> </body> </html>
标签:line body logs 技术分享 char back overflow idt lang
原文地址:http://www.cnblogs.com/halai/p/6846654.html