1.ie6双边距问题
正常显示
ie6显示
解决方法加display:inline;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{margin: 0;padding: 0}
li {
list-style: none;
width: 200px;
height: 200px;
background: red;
margin: 0 10px;
float: left;
display: inline;
}
</style>
</head>
<body>
<ul>
<li></li>
<li></li>
<li></li>
<li></li>
</ul>
</body>
</html>
2.ie6 高度小于16px 都默认成16px
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
*{margin: 0;padding: 0}
div {
/* ie6把小于10px的高度都默认成16px */
/*
解决方法:
1.font-size: 0;
2.overflow: hidden;
*/
height: 10px;
/* font-size: 0; */
/* overflow: hidden; */
}
</style>
</head>
<body>
<div></div>
</body>
</html>
*ie6,7支持
_ie6支持