zoukankan      html  css  js  c++  java
  • 永远在页面底部的层

    感谢 天涯桑 提供

     1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     2 <html xmlns="http://www.w3.org/1999/xhtml">
     3 <head>
     4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     5 <title>无标题文档</title>
     6 <style type="text/css">
     7 body { padding:0; margin:0;  _background: #fff url(image/a.txt);_background-attachment: fixed;}
     8 #box { position:relative; height:2000px;}
     9 #footer {background-color:#096;z-index:999;position:fixed;bottom:0;left:0;width:100%;_position:absolute;_top: expression(documentElement.scrollTop + documentElement.clientHeight-this.offsetHeight);overflow:visible; height:50px;}
    10 </style>
    11 </head>
    12 <body>
    13 <div id="box">fdsafds</div>
    14 <div id="footer">fds</div>
    15 </body>
    16 </html>


    关键在于body {  _background: #fff url(image/111.txt);_background-attachment: fixed;}
    我在这里用111.txt的意思是说这里其实是可以不用图片的,也就是说这个图片有没有都不得要,真正取作用的是background-attachment: fixed;。

  • 相关阅读:
    枚举子集 Codeforces306 Div2 B
    UVA140 剪枝
    回溯法浅谈
    UVA10976
    UVA11059
    BZOJ3355
    hdu 2509 博弈 *
    博弈专题
    hdu 1404 找sg ***
    hdu 4759 大数+找规律 ***
  • 原文地址:https://www.cnblogs.com/qzsonline/p/2946230.html
Copyright © 2011-2022 走看看