zoukankan      html  css  js  c++  java
  • 页面 footer 样式解决方案

    <!DOCTYPE html>
    <html>
    <head>
    	<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
        <meta charset="utf-8">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    	<title>Demo</title>
    
    	<style type="text/css">
    		* {
    			padding: 0;
    			margin: 0;
    		}
    		html, body {	
    			height: 100%; /* 重点 */
    		}
    		body > .wrap {
    			height: auto;
    			min-height: 100%; /* 重点 */
    		} 
    		.main {
    			padding-bottom: 150px;
    		}
    		.header {
    			background: #ffc543;
    			height: 60px;
    		}
    		.content {
    			background: red;
    			/*height: 1000px;*/
    		}
    		.footer {
    			height: 100px;	/* 重点 */
    			margin-top: -100px;	/* 重点 */
    			background: gray;
    			clear: both;
    		}
    		/*.clearfix:after,
    		.clearfix:before {
    			content: "";
    			display: block;
    			height: 0;
    			clear: both;
    			visibility: hidden;
    		}
    		*/
    	</style>
    
    </head>
    <body>
    	<div class="wrap">
    		<div class="main clearfix">
    			<div class="header">
    				头部
    			</div>
    			<div class="content">
    				主体
    			</div>
    		</div>		
    	</div>
    
    	<div class="footer">
    		底部
    	</div>
    </body>
    </html>
    
  • 相关阅读:
    OS-lab4
    OS-lab3
    OS-lab2
    OS-lab1
    OO第四单元总结
    OO第三单元总结
    OO第二单元总结
    HTTP_POST
    实习日志1(2020.7.27-2020.9.31)
    Web app ------ 从Servlet读取Json数据并显示,生成历史数据曲线图
  • 原文地址:https://www.cnblogs.com/shiddong/p/7308809.html
Copyright © 2011-2022 走看看