footer置底布局
想要一个效果
没滚动条时,footer置于最底端(窗口最底端)
有滚动条时,滚动时footer始终处于页面(文档)最底部
-------------------------------------------------------
这种只能实现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>无标题文档</title> <style type="text/css"> <!-- html,body{margin:0;padding:0;} html,body,.wrap,.content{height:100%;} .content{margin-bottom:-100px;} .mfooter,.footer{height:100px;} .footer{background:red;} --> </style> </head> <body> <div class="wrap"> <div class="content"> wwwww <div class="mfooter"></div> </div> <div class="footer">111</div> </div> </body> </html>
                    
                
                
            
        
浙公网安备 33010602011771号