1、 如果各个浏览器的高度都不相同,代码如下:
.warp{
Height:100px; /*IE6、IE7、IE8、FF识别*/
Height:110px\9; /*IE8识别*/
*height:120px!important; /*IE7 识别*/
*height:130px; /*IE6、IE7识别,但上一段代码中!important的级别比*号的级别高,所以此段代码只有IE6中才有效*/
}
2、如果各浏览器高度只有IE6和IE7中相同,而FF不同,代码如下:
.warp{
.warp{
Height:100px; /*IE6 、IE7、 IE8、FF识别*/
*height:120px; /*IE6、IE7识别*/
}
}
3、对各浏览器单独写不同代码,如下:
.warp{ height:200px; } /* IE6 、IE7、 IE8、FF识别*/
.warp{ height:300px\9;} /*IE8识别*/
*html .warp{ hegith:210px; } /*IE6识别*/
*+ html .warp{ height:300px;} /*IE7识别*/
4、如果各浏览器高度相同只有IE6的不同,代码如下:
Height:100px; /* IE6 、IE7、 IE8、FF识别*/}
.warp{
Height:100px; /* IE6 、IE7、 IE8、FF识别*/
_Height:120px; /*IE6识别*/
}
如果您觉得本文的内容对您的学习有所帮助:
关键字:
div+css CSS_Hack