<div style="width: 90%;height: 3000px;margin: 0 auto; background: red;"></div> <div class="footer"> <div class="son">sssssssssssssssssssssss</div> </div>
*{ margin: 0; padding: 0; } html, body { /*height: 100%;*/ min-height: 100%; position: relative; } body { /*padding-bottom: 298px;*/ box-sizing: border-box; padding-bottom: 120px; } html { height: 100%; } .footer { width: 100%; position: absolute; left: 0; bottom: 0; } .son{ width: 100%; height: 100px; background: red; }