Bootstrap 4 page wide header bar above navbar

前端 未结 1 1845
野趣味
野趣味 2021-01-23 05:58

I have a working navbar, but how to get a pagewide bar above the navbar (Pagewide div). In mobile view the bar can disappear.

相关标签:
1条回答
  • 2021-01-23 06:10

    The fixed-top navbar is always on top.

    To put your header bar above it, determine how tall you want the pagewide bar, and set the top: space above the fixed navbar. Use a media query to hide on smaller screens.

    https://www.codeply.com/go/bembG1Lulg

    @media (min-width: 992px) {
        .navbar {
            top: 54px;
        } 
    
        .pagewide {
            height: 54px;
        }
    }
    
    0 讨论(0)
提交回复
热议问题