您的当前位置:首页>全部文章>文章详情

Vue使用flex给页脚固定定位方法

发表于:2023-09-06 10:43:38浏览:84次TAG: #Vue #CSS
<div class="wrapper">
     <div class="header">header</div>
     <div class="section">section</div>
     <div class="footer">footer</div>
</div>
 html,body{
     height: 100% ;
 }

 .wrapper{
     display: flex ;
     flex-direction: column ;
     min-height: 100% ;
 }

 .header{
     flex: 0 ;
 }

 .section{
     flex: 1 ;
 }

 .footer{
     flex: 0 ;
 }