css解決瀏覽器兼容性問題

  1. 在樣式前後加上 <!--[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]-->
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章