Notice: Undefined index: HTTP_ACCEPT_ENCODING in C:\server\web\www.showyounger.com\s-system.php on line 2
层固定在右下角 | 小样儿(ShowYounger)
小样儿,顶呱呱!!![http://www.showyounger.com]
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>IE6 position:fixed</title>
- <style type="text/css">
- * { margin:0; padding:0;}
- #content{ height:2000px; }
- #a{ position:fixed; bottom:0; right:0; width:200px; height:60px; background:#F00;}
- /*IE6 fixed bug*/
- * html{overflow:hidden;}
- * html body{height:100%;overflow:auto;}
- * html #a{position:absolute;right:18px;}
- </style>
- </head>
- <body>
- <div id="content">
- IE6 position:fixed
- </div>
- <div id="a">IE6 position:fixed</div>
- </body>
- </html>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>层固定</title>
- <style>
- *{margin:0;padding:0;}
- html {position:relative;width:100%;height:100%;overflow:hidden;}
- body{height:100%;width:100%;background:#EFEFEF;height:100%;overflow:auto;}
- #a{width:300px;height:100px;background:red;position:fixed;right:20px;bottom:0px;}
- </style>
- <script>
- var isie6 = window.XMLHttpRequest?false:true;
- window.onload = function(){
- var a = document.getElementById('a');
- var d = document.getElementById('d');
- if(isie6){
- a.style.position = 'absolute';
- window.onscroll = function(){
- d.innerHTML = '111';
- }
- }
- }
- </script>
- </head>
- <body>
- <div id ="d" style="display:none;">11</div>
- <div id='a'>test</div>
- <p>start</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>--</p><p>end</p>
- </body>
- </html>