1 *{ 2 margin:0; 3 padding:0; 4 } 5 html,body{ 6 height:100%; 7 } 8 .wrap{ 9 display:-webkit-Box; 10 display:-webkit-flex; 11 display:-ms-flexBox; 12 display:flex; 13 -webkit-Box-orient:vertical; 14 -webkit-flex-direction:column; 15 -ms-flex-direction:column; 16 flex-direction:column; 17 width:100%; 18 height:100%; 19 } 20 .header,.footer{ 21 height:40px; 22 line-height:40px; 23 text-align: center; 24 color: #fff; 25 background-color:#379aeb; 26 text-align:center; 27 } 28 .main{ 29 -webkit-Box-flex:1; 30 -webkit-flex:1; 31 -ms-flex:1; 32 flex:1; 33 width:100%; 34 height: 200px; 35 overflow: auto; 36 }
1 <div class="wrap"> 2 <div class="header">header</div> 3 <div class="main"> 4 内容区域<br> 5 内容区域<br> 6 内容区域<br> 7 </div> 8 <div class="footer">footer</div> 9 </div>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。