欢迎来到DIVCSS5查找CSS资料与学习DIV CSS布局技术!

CSS实例一:
让IE6-IE8显现一致的内容,DIV CSS代码下列:

 

 <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DIV IF前提实例WWW.CSS5.COM实例</title>
</head>
<body>
你正在使用:
<!--[if IE 7]> 
<h2>IE7</h2>
<![endif]-->
<!--[if IE 6]> 
<h2>IE6</h2>
<![endif]-->
<!--[if IE 8]> 
<h2>IE8</h2>
<![endif]-->
<br><br>
<strong>CSS5说明</strong>:假如你的浏览器版本为多少即会透露表现IE若干,针对IE6-IE8试验CSS教程 
</body>
</html>
 

 

 

注明:以上针对差距IE表示差别网页模式DIV+CSS实例试验。

DIV+CSS实例二:
让IE6-IE8展现一致CSS花式成就,DIV CSS代码以下:

 

 <!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。

如需转载,请注明文章出处和来源网址:http://www.divcss5.com/css-tool/t52585.shtml