• css解决无论页面长短footer永远置底


    <!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>footer固定到页面底部</title>
    <script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
    <style type="text/css">
    html,body{margin:0;padding:0;height:100%}
    .container{min-height:100%;height:auto !important;height:100%;/*ie6不识别min-height,如上述处理*/position:relative;}
    .header{background:#ff0;padding:10px;}
    .page{960px;margin:0 auto;padding-bottom:60px;/*padding等于footer的高度*/}
    .footer{position:absolute;bottom:0;100%;height:60px;/*footer的高度*/background:#6cf;clear:both;}
    .left{220px;float:left;margin-right:20px;background:lime;}
    .content{background:orange;480px;float:left;margin-right:20px;}
    .right{220px;float:right;background:green;}
    .clearfix:after,
    .clearfix:before{content:"";display:table}
    .clearfix:after{clear:both;overflow:hidden}
    .clearfix{zoom:1;}
    </style>
    </head>
    <body >
    <div class="container">
    <div class="header">这是头部</div>
    <div class="page clearfix">
    <div class="left">left sidebar</div>
    <div class="content">main content</div>
    <div class="right">right sudebar</div>
    </div>
    <div class="footer">footer section</div>
    </div>

    </body>
    </html>



  • 相关阅读:
    安卓开发_求好评功能
    安卓开发_深入理解Content Provider
    安卓开发_数据存储技术_sqlite
    安卓开发_慕课网_Fragment实现Tab(App主界面)
    安卓开发_数据存储技术_外部存储
    Go语言基础之数组
    Go语言基础之结构体
    Go操作MySQL
    Go语言基础之文件操作
    Go第三方日志库logrus
  • 原文地址:https://www.cnblogs.com/xiaotaiyang/p/3835629.html
Copyright © 2020-2023  润新知