mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Prevent collapsed navbar in Non-responsive Example
Closes #15291 by merging it.
This commit is contained in:
parent
033dbfd06c
commit
10c8dad848
1 changed files with 4 additions and 8 deletions
|
@ -36,15 +36,11 @@
|
|||
<nav class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container">
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<!-- The mobile navbar-toggle button can be safely removed since you do not need it in a non-responsive implementation -->
|
||||
<a class="navbar-brand" href="#">Project name</a>
|
||||
</div>
|
||||
<div id="navbar" class="navbar-collapse collapse">
|
||||
<!-- Note that the .navbar-collapse and .collapse classes have been removed from the #navbar -->
|
||||
<div id="navbar">
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="#">Home</a></li>
|
||||
<li><a href="#about">About</a></li>
|
||||
|
@ -85,7 +81,7 @@
|
|||
</div>
|
||||
|
||||
<h3>What changes</h3>
|
||||
<p>Note the lack of the <code><meta name="viewport" content="width=device-width, initial-scale=1"></code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and are basically good to go.</p>
|
||||
<p>Note the lack of the <code><meta name="viewport" content="width=device-width, initial-scale=1"></code>, which disables the zooming aspect of sites in mobile devices. In addition, we reset our container's width and changed the navbar to prevent collapsing, and are basically good to go.</p>
|
||||
|
||||
<h3>Regarding navbars</h3>
|
||||
<p>As a heads up, the navbar component is rather tricky here in that the styles for displaying it are rather specific and detailed. Overrides to ensure desktop styles display are not as performant or sleek as one would like. Just be aware there may be potential gotchas as you build on top of this example when using the navbar.</p>
|
||||
|
|
Loading…
Reference in a new issue