css hack整理,更新於2011-7-27

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>CSS hack</title>
<style>
.box{  
	color:red;  
	*color:green;  /* IE6 IE7 */  
	*+color:green;  /* IE6 IE7 */  
	[color:green;  /* IE6 IE7 */  
	_color:blue;  /* IE6*/  
	color:yellow\9;  /* IE6 IE7 IE8 IE9 */  
	color:#CCCCCC\0;   /* IE8 IE9 */  
	color:blue\0/IE8+9;  /* IE8 IE9 */  
	color:blue\9\0;  /* IE9 */  
	[;color:#0ad682;];  /* IE6 IE7 webkit*/  
}  
:root .box { color:pink \0/IE9; }  /* IE9 */  
:root .box { color:#eaffa3\0/; }  /* IE9 */  
:root .box { color:#eaffa3\0; }  /* IE9 */  
  
html* .box{  
	background-color:red;/* IE6 IE7 */  
}  
  
*+html .box{  
	background-color:#0000FF;/* IE7 */  
}  
  
* html .box{  
	background-color:#00FFFF;/* IE6 */  
}  
  
/* webkit */  
@media screen and (-webkit-min-device-pixel-ratio:0)  
{  
	.box { display:none; }  
}  
  
/* Opera */  
@media all and (-webkit-min-device-pixel-ratio:10000), not all and (-webkit-min-device-pixel-ratio:0)  
{  
	head~body .box { background-color:#CCC; }  
}  
</style>
</head>

<body>
</body>
</html>


 

發佈了52 篇原創文章 · 獲贊 3 · 訪問量 10萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章