The effect below can only be seen under IE6.
<ptml> <pead> <title> to judge IE version and give prompts to upgrade browser </title> </pead> <style type= "Text/css" > #i e6-warning{background:rgb (255,255,225) URL ("/upload/201006/20100628012515690.gif") no-repeat scroll 3px Center; Position:absolute; top:0; left:0; font-size:12px; Color: #333; width:97%; padding:2px 15px 2px 23px; Text-align:left; } #ie6-warning a {text-decoration:none; } </style> <body> <!--[if LTE IE 6]> <div id= "ie6-warning" > You are using Internet Explorer 6, the display effect on this page may be different. It is recommended that you upgrade to Internet Explorer 8 or the following browsers: Firefox/chrome/safari/opera </div> <script type= "Text/javascript" > function position_fixed (el, Eltop, Elleft) {//Check if this is IE6 if (!window. XMLHttpRequest) Window.onscroll = function () {El.style.top = (Document.documentElement.scrollTop + eltop) + "px"; El.style.left = (Document.documentElement.scrollLeft + elleft) + "px"; else el.style.position = "fixed"; } position_fixed (DOCUMENT.GETELEMENTBYid ("ie6-warning"), 0, 0); </script> <! [endif]--> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]