效果解释 效果解释 文字解释就是内容不足时,显示在页面底部;如果内容多时,显示在内容的下面; 我们同样用flex的弹性盒方案来实现: .demo{ min-height:100vh; display:flex; flex-direction:column; word-break:break-all; .main{ flex:1 0 auto ; } .footer{ height:20px; margin-top:auto; border:1px solid red; }} 代码地址:https://codepen.io/robinson90/pen/yLerNEL