让IE6-IE8显示不同CSS样式效果,DIV CSS代码

2024-01-18 13:33 小编
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>CSS IF前提hack实例 css5.com.cn</title>
<!--[if IE 6]> 
<style type="text/css">
.CSS5{ color:#F00;}
</style>
<![endif]-->
<!--[if IE 7]> 
<style type="text/css">
.CSS5{ color:#FF0;}
</style>
<![endif]-->
<!--[if IE 8]> 
<style type="text/css">
.CSS5{ color:#00F;}
</style>
<![endif]-->
</head>
<body>
<div class="CSS5">
DIV CSS履行默示:<br>
我在IE6下是红色采,在IE7下是黄色彩,在IE8下是蓝色采
</div>
</body>
</html>

 


阐明:以上试验仅履行IE6-IE8下if HACK。


Tag: 代码 效果
在线咨询 拨打电话

电话

13363039260

微信二维码

微信二维码