我想要实现的是告诉使用旧 IE 版本的用户,他们将无法正确查看网站,因为 IE 不支持许多现代技术。我可以使用并提醒 courser 的弹出窗口,但希望在整个页面上打开一个图层。
我试图用一个固定的 div 来实现这一点,但它没有用。IE 只是在页面顶部显示 div,而不是从一侧到另一侧覆盖页面。
这是我的 CSS
background-color: #c0c0c0;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
z-index:100;
我在其他帖子中读到,问题可能在于将 div 放在身体内......所以我把它移到外面,但结果是一样的。
这是我正在使用的一段代码
<?
$ie6 = "MSIE 6.0";
$ie7 = "MSIE 7.0";
$ie8 = "MSIE 8.0";
$ie9 = "MSIE 9.0";
$browser = $_SERVER['HTTP_USER_AGENT'];
$browser = substr("$browser", 25, 8);
if($browser == $ie6 || $browser == $ie7 || $browser == $ie8 || $browser == $ie9){
//echo "<script>alert('Your Browser is Internet Explorer version $browser. Please update your browser to Internet Explorer version 10 to view the website correctly. IE versions under 10 does not support many of the modern web technologies and therefore you will not see the website correctly. You can also use other browsers like Chrome, Mozila, Opera, etc');</script>";
print "<div class=ie><div class=ie_message>Your Browser is Internet Explorer version $browser. Please update your browser to Internet Explorer version 10 to view the website correctly. IE versions under 10 does not support many of the modern web technologies and therefore you will not see the website correctly. You can also use other browsers like Chrome, Mozila, Opera, etc</div></div>";
}
?>
无法提供链接,因为我正在测试是否在本地服务器上
谢谢