当前位置: 网站建设 > 网页设计 > 建站经验 >

IE浏览器Css if hack条件语法操作说明

时间:2013-03-02 03:48来源:未知 作者:admin 点击:

标签:IE浏览器Css if hack条件语法操作说明 语法(12)操作说明(1)CSS(655)以上(14)条件(10)hack(27)说明(9)浏览器(54)
说明:以上针对不同IE显示不同网页内容DIV+CSS实例实验。 !--[if IE 9] Only IE 9/- ![endif]-- 仅IE9可识别 1、Css if hack条件语法 !--[if IE] Only IE ![endif]-- 仅所有的WIN体系自带IE可识别 !--[if IE 5.0] Only IE 5.0 ![endif]-- 只有IE5.0可以识别
IE浏览器Css if hack条件语法操作说明》文章地址:http://www.tfxk.com/wangyesheji/jianzhanjingyan/0302335H2013.htm

说明:以上针对不同IE显示不同网页内容DIV+CSS实例实验。

<!--[if IE 9]> Only IE 9/- <![endif]-->
仅IE9可识别

1、Css if hack条件语法
<,ie中的flash出现激活框“单击以激活并使用此控件”的解决方法; !--[if IE]> Only IE <![endif]-->
仅所有的WIN体系自带IE可识别
< !--[if IE 5.0]> Only IE 5.0 <![endif]-->
只有IE5.0可以识别
< !--[if gt IE 5.0]> Only IE 5.0+ <![endif]-->
IE5.0包换IE5.5都能够识别
< !--[if lt IE 6]> Only IE 6- <![endif]-->
仅IE6可辨认
< !--[if gte IE 6]> Only IE 6/+ <![endif]-->
IE6以及IE6以下的IE5.x都可识别

<!--[if lte IE 7]> Only IE 7/- <![endif]-->
仅IE7可识别
< !--[if gte IE 7]> Only IE 7/+ <![endif]-->
IE7以及IE7以下的IE6、IE5.x都可识别

<!&ndash,IE与FF不兼容网页布局CSS问题;[if IE 8]> = IE8 仅IE8可识别
<!–[if lt IE 8]> = IE7或更低版本
<!–[if gte IE 8]> = 高于或者即是IE8版本

2、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前提实例</title>
</head>
<body>
你正在应用:
<!--[if IE 7]>
<h2>IE7</h2>
<![endif]-->
<!--[if IE 6]>
<h2>IE6</h2>
<![endif]-->
<!--[if IE 8]>
<h2>IE8</h2>
<![endif]-->

<!--[if IE 9]>
<h2>IE9</h2>
<![endif]-->
<br><,IE8中text-align center偏左的解决办法;br>
<strong>解释</strong>:假如你的浏览器版本为多少即会显示IE多少,针对IE6-IE9实验</body>
</html>

Tag:IE   浏览器   CSS   if   hack     IE   阅读器   CSS   if   hack    

<!--[if IE 9]>
<style type="text/css">
.divcss{ color:#000;}
</style>
<![endif]-->
</head>
<body>
<div class="divcss",IE6绝对定位的bug及其解决办法;>
DIV CSS实验提醒:<br>
我在IE6下是红色彩,IE6灵异事件之歌剧院魅影,在IE7下是黄颜色,在IE8下是蓝颜色,在IE9下是玄色
</div>,IE6到底支持不支持!important;
</body>
</html>

--> [网站建设之]IE浏览器Css if hack条件语法操作说明

DIV+CSS实例二:
让IE6-IE8显示不同CSS款式效果,DIV CSS代码如下:
<!DOCTYPE html>
<html>
<head>
<meta http-equiv=",IE6中PNG图像不透明是什么问题;Content-Type" content=",IE6与W3C标准的盒模型差异;text/html; charset=utf-8" />
<title>CSS IF条件hack实例</title>
<!--[if IE 6]>
<style type="text/css">
.divcss{ color:#F00;}
</style>
<![endif]-->
<!--[if IE 7]>
<style type="text/css">
.divcss{ color:#FF0;}
</style>
<![endif]-->
<!--[if IE 8]>
<style type=",IE6-IE7-IE8-FireFox css的浏览器兼容技巧;text/css">
.divcss{ color:#00F;}
</style>
<![endif]-->

<!--[if IE 8]> Only IE 8/- <,IE6,7下实现white-space pre-wrap;;![endif]-->
仅IE8可识别

阐明:以上试验仅实验IE6-IE9下if HACK。

注:在 if  后加 lt gte有不同后果 (加入其它参数同理)


(责任编辑:网站建设)
IE浏览器Css if hack条件语法操作说明相关文章
上一篇:ie中的flash出现激活框“单击以激活并使用此控件”的解决方法 下一篇:IE浏览器的Css if hack条件语法操作
回到顶部