在网页中,插入如下代码,则页面用IE8打开,会进行浏览器告警。代码如下:
<div>
<!--[if lte IE 8]>
<style scoped="scoped">
.WarningOldIE{
margin: 10px;
background: #ecc;
color: #611;
border: 2px solid;
padding: 10px;
font-family: sans-serif;
font-size: 14px;
}
</style>
<div class="WarningOldIE">
<p>您使用的浏览器不受支持。</p>
<p>Cloudera Manager 在 <a href="http://www.google.com/chrome/">Google Chrome</a>、<a href="http://www.apple.com/safari/">Apple Safari</a>、<a href="http://getfirefox.com/">Mozilla Firefox</a> 或 <a href="http://www.microsoft.com/windows/internet-explorer/">Microsoft Internet Explorer 9 及更高版本中可获得最佳体验。</a></p>
</div>
<![endif]-->
</div>
运行在IE8上的提示效果如下: