有粘性页脚时更改页脚高度(Materialise CSS)

时间:2018-03-23 15:03:00

标签: html css materialize

使用物化框架时,是否有可能使页脚高度(40-50px)更小,同时将其作为粘性页脚。每当我尝试它时,页脚下方都有空格。在我使用的html和css下面:



  <footer class="white-text">
        <div class="container">
            <div class="row">
                <div class="col 16 s12">
                    <h5 class="white-text">Lorem ipsum</h5>
                    <p class="grey-text text-lighten-4">Lorem ipsum.</p>
                </div>
            </div>
        </div>
    </footer>

   
&#13;
$( "td:nth-child(5)" ).not( "td:empty" ).addClass("wine-currency");
&#13;
&#13;
&#13;

1 个答案:

答案 0 :(得分:0)

我希望这是您正在寻找的答案

layout.css中:

* {
    margin: 0;
}
html, body {
    height: 100%;
}
.wrapper {
    min-height: 100%;
    height: auto !important;
    height: 100%;
    margin: 0 auto -142px; /* the bottom margin is the negative value of the footer's height */
}
.footer, .push {
    height: 142px; /* .push must be the same height as .footer */
}

/*


*/

html页面:

<html>
    <head>
        <link rel="stylesheet" href="layout.css" ... />
    </head>
    <body>
        <div class="wrapper">
            <p>Your website content here.</p>
            <div class="push"></div>
        </div>
        <div class="footer">
            <p>Copyright (c) 2008</p>
        </div>
    </body>
</html>