Does a header or nav require a container?

时间:2015-07-08 15:49:00

标签: twitter-bootstrap-3

I have seen some examples where there is a container and some where there is not. I am currently using a container-fluid, but I was curious as to if it is needed and if so, does the class belong on the header element or the nav element?

1 个答案:

答案 0 :(得分:0)

在文档中,navbar-header周围有一个.container-fluid div,但不在nav本身周围。见下文:

<nav class="navbar navbar-default">
   **<div class="container-fluid">
      <div class="navbar-header">
         <!-- Content Here -->
      </div>
   **</div>
</nav>

希望这有帮助!