用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萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章