赞
踩
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>footer需要固定在底部</title> <style type="text/css"> html,body{font-size: 14px;font-family: "微软雅黑";text-align: center;width: 100%;height: 100%; min-height: 100%;border:0;line-height: none;} body{padding:0px; margin:0px ;} .container{position:relative;height: auto;min-height: 100%;margin: 0} .container .header{height: 100px;background: #0000FF;} .container .push{padding-bottom: 100px;} .footer{position:relative;height: 100px;margin-top:-100px;background: #0000FF;} </style> </head> <body> <div class="container"> <div class="header"> </div> <div class="content"> </div> <div class="push"></div><!--push在此为footer占位,高度和footer的一样--> </div> <div class="footer"> <p>底部文本</p> </div> </body> </html>
其他:
http://www.taodudu.cc/news/show-307923.html?action=onClick
https://code84.com/735200.html
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。