html { position: relative; min-height: 100%;}body { <!-- 你底部div的高度 --> margin-bottom: 100px;}footer { position: absolute; bottom: 0; width: 100%; <!-- 你底部div的高度 --> height: 100px;}