jsp页面 如何解决ie8 和浏览器 ie9 兼容问题

jsp页面 如何解决ie8 和浏览器 ie9 兼容问题,第1张

将IE进行降权处理,添加如下代码

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

页面访问的时候全部以IE8处理

试试这个:

如果ie8或ie7执行

<!--[if IE 8]><h2>IE8</h2><![endif]-->

<!--[if IE 7]><h2>IE7</h2><![endif]-->

如果大于或小于版本IE,并包括这个版本,相当于>=ie7,用lte 或 gte

<!--[if lte IE 7]>Only IE 7/- <![endif]-->

<!--[if gte IE 7]>Only IE 7/+ <![endif]-->

如果大于或小于某版本IE,并不包括这个版本,比如>ie7,用lt 或 gt

<!--[if lt IE 7]>Only IE 7- <![endif]-->

<!--[if gt IE 7]>Only IE 7+ <![endif]-->

以上版本、代码位置、内容自己请控制,希望有帮助

内容属性值在接收到异于先前叙述的数值时是具有d性的。这能使你对于IE如何显示你的网页更有 *** 控性。举例来说,你可以设定内容属性值为IE=7.5。当你这样做的时候,IE尝试将这个值转换为version vector并选择最接近的结果。在这个例子中,IE会将其设定为IE7 mode。下面的范例显示该模式设定为其他值的状况。

<meta http-equiv="X-UA-Compatible" content="IE=4"><!-- IE5 mode -->

<meta http-equiv="X-UA-Compatible" content="IE=7.5"><!-- IE7 mode -->

<meta http-equiv="X-UA-Compatible" content="IE=100"><!-- IE8 mode -->

<meta http-equiv="X-UA-Compatible" content="IE=a"><!-- IE5 mode -->


欢迎分享,转载请注明来源:内存溢出

原文地址: https://www.outofmemory.cn/bake/11880232.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-19
下一篇 2023-05-19

发表评论

登录后才能评论

评论列表(0条)

保存