html页脚固定在底部的方法

<style type="text/css">
        html {
            height: 100%;
        }

        body {
            height: 100%;
            margin: 0;
            padding: 0;

        }

        .container, .jumbotron {
            min-height: 88%;
        }

        .footer {
            position: absolute;
            width: 100%;
            height: 50px;
            z-index: 10;
            text-align: center;
        }
    </style>

container,jumbotron的高度可以根据footer的高度随机调整

posted @ 2019-12-31 14:51  圣西罗枫叶  阅读(823)  评论(0)    收藏  举报