使用CSS Hack解決IE6雙倍邊距Bug
IE6雙倍邊距Bug產生條件:浮動、外邊距、塊元素(同時)
ps:最好的方法display:inline;
<!DOCTYPE html>**重點內容**
<html lang="en">
<head>
<meta charset="UTF-8">
<title>CSS Hack IE6</title>
</head>
<style type="text/css">
#box{
width: 300px;
height: 300px;
background: #ccc;
float: left;
margin-left: 10px;
_margin-left: 5px; /*IE6*/
}
</style>
<body>
<div id="box"></div>
</body>
</html>