- 在樣式前後加上 <!--[if IE X]> <![endif]--> ,被包含的css樣式只會在對應的ie版本內進行加載,從而解決兼容性問題.
<!--[if IE 6]>
<style type="text/css">
div{
width:550px;
text-align: center;
}
.divOne{
width:60;
height: 100;
float: left;
margin-top: 35px;
margin-left: 25px;
}
.divInOne{
width: 30;
height: 30;
float: left;
margin-left: 23px;
}
</style>
<![endif]-->