简体   繁体   中英

How to make a sliding side navigation bar that is only in middle of display and not the whole height of the screen? (bootstrap 3, materialize)

I am using the following sticky footer template from bootstrap: http://getbootstrap.com/examples/sticky-footer-navbar/

I want to have a side-nav bar (like this one: http://materializecss.com/side-nav.html , the kind you can click a button and it slides out from the side), but I do not want it to take up the whole page, I only want it to cover up the "middle" section of the page above the footer and below the header.

Does bootstrap or materialize support this sliding side-navigation bar in the middle of the page and not take up the whole thing?

You just have to customize css.

For example, with a 80px header & a 80px footer :

.side-nav {
    top: 80px;
    height: calc(100% - 160px);
}

http://codepen.io/migli/pen/JNPaep

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM