用css检测浏览器是否

<!--[if lte IE 6]>
<style type="text/css">
.ie6 { width:946px; height:18px; overflow:hidden; padding:6px 0; margin:0 auto; text-align:center; font-size:14px; line-height:18px; color:#F00; border:#F30 2px solid; background:#FC3; }
.ie6 .txt { float:left; padding-left:10px; }
.ie6 .close { background: url(close.gif) left top no-repeat; width: 13px; height: 13px; overflow: hidden; text-indent: -1000px; z-index: 2; cursor:pointer; float:right; margin:2px 10px 0 0; }
.ie6 .clear { display:block; clear:both; overflow:hidden; line-height:0; }
</style>
<div class="ie6" id = "ie6">
<span class="txt">廊坊网提示:您的浏览器可能是ie6或以下版本,为了您获得更好的上网体验,建议立即升级浏览器。<a href="http://www.google.cn/chrome" target="_blank" title="最好用的浏览器">猛击这里安装谷歌chrome浏览器</a></span>
<span class="close" οnclick="#" title="真的要关闭吗?">关闭</span>
<span class="clear"></span>
</div>
<![endif]-->
<!--enorth cms{ ie6 }enorth cms-->


<!-- ie6 end -->
发布了71 篇原创文章 · 获赞 7 · 访问量 9万+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章