<meta http-equiv="x-ua-compatible" content="ie=7" />
background:#ffc; /* 对firefox有效*/
*background:#ccc; /* 对ie7有效 */
_background:#000; /* 只对ie6有效 */
<html xmlns="http://www.w3.org/1999/xhtml">
margin-bottom:40px; /*ff的属性*/
margin-bottom:140px\9; /* IE6/7/8的属性 */
color:red\0; /* IE8支持 */
*margin-bottom:450px; /*IE6/7的属性*/下面以一个实例的形式表现,大家可以运行代码查看一下效果<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>2010最新全面兼容ie6,ie7,ie8,ff的CSS HACK写法——www.aa25.cn标准之路</title>
<style type="text/css">
#abc {
border:2px solid #00f; /*ff的属性*/
border:2px solid #090\9; /* IE6/7/8的属性 */
border:2px solid #F90\0; /* IE8支持 */
_border:2px solid #f00; /*IE6的属性*/
}
/*上下顺序不可以写错*/
</style>
</head>
<body>
<div id="abc">
<ul>
<li>FF下蓝边</li>
<li>IE6下红边</li>
<li>IE7下绿边</li>
<li>IE8下黄边</li>
<li>转载请注明来源标准之路<a href="http://www.68css.com">www.68css.com</a></li>
</ul>
</div>
</body>
</html>