css固定footer到浏览器底部的方法

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <meta charset="utf-8" />
    <style>
        body {
            padding-bottom: 50px;
        }
 
        .footer {
            position: fixed;
            left: 0px;
            bottom: 0px;
            width: 100%;
            height: 50px;
            background-color: #eee;
            z-index: 9999;
        }
    </style>
</head>
<body>
    内容,可以大量复制看效果<br />
 
    <div class="footer">固定在底部</div>
</body>
</html>

  

上一篇:「HTML+CSS」--自定义按钮样式【002】


下一篇:公共头公共尾的模块化思想(便于修改代码,减少cv)