mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-06 04:08:22 +01:00
fixes #18293: clean up sticky stuff
This commit is contained in:
parent
5a6a128728
commit
3d45bd6106
@ -21,42 +21,42 @@
|
|||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Fixed navbar -->
|
<!-- Fixed navbar -->
|
||||||
<nav class="navbar navbar-default navbar-fixed-top">
|
<div class="pos-f-t">
|
||||||
|
<div class="collapse" id="navbar-header">
|
||||||
|
<div class="container bg-inverse p-a">
|
||||||
|
<h3>Collapsed content</h3>
|
||||||
|
<p>Toggleable via the navbar brand.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<nav class="navbar navbar-light navbar-static-top bg-faded">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="navbar-header">
|
<button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2">
|
||||||
<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>
|
</button>
|
||||||
<a class="navbar-brand" href="#">Project name</a>
|
<div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2">
|
||||||
</div>
|
<a class="navbar-brand" href="#">Sticky footer</a>
|
||||||
<div id="navbar" class="collapse navbar-collapse">
|
|
||||||
<ul class="nav navbar-nav">
|
<ul class="nav navbar-nav">
|
||||||
<li class="active"><a href="#">Home</a></li>
|
<li class="nav-item active">
|
||||||
<li><a href="#">About</a></li>
|
<a class="nav-link" href="#">Nav item <span class="sr-only">(current)</span></a>
|
||||||
<li><a href="#">Contact</a></li>
|
</li>
|
||||||
<li class="dropdown">
|
<li class="nav-item">
|
||||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown</a>
|
<a class="nav-link" href="#">Another nav item</a>
|
||||||
<div class="dropdown-menu">
|
</li>
|
||||||
<a class="dropdown-item" href="#">Action</a>
|
<li class="nav-item">
|
||||||
<a class="dropdown-item" href="#">Another action</a>
|
<a class="nav-link" href="#">More nav</a>
|
||||||
<a class="dropdown-item" href="#">Something else here</a>
|
</li>
|
||||||
<div role="separator" class="dropdown-divider"></div>
|
<li class="nav-item">
|
||||||
<h6 class="dropdown-header">Nav header</h6>
|
<a class="nav-link" href="#">Last link</a>
|
||||||
<a class="dropdown-item" href="#">Separated link</a>
|
|
||||||
<a class="dropdown-item" href="#">One more separated link</a>
|
|
||||||
</div>
|
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div><!--/.nav-collapse -->
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Begin page content -->
|
<!-- Begin page content -->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="page-header">
|
<div class="page-header m-t">
|
||||||
<h1>Sticky footer with fixed navbar</h1>
|
<h1>Sticky footer with fixed navbar</h1>
|
||||||
</div>
|
</div>
|
||||||
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body > .container</code>.</p>
|
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS. A fixed navbar has been added with <code>padding-top: 60px;</code> on the <code>body > .container</code>.</p>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="text-muted">Place sticky footer content here.</p>
|
<span class="text-muted">Place sticky footer content here.</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
/* Set the fixed height of the footer here */
|
/* Set the fixed height of the footer here */
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
line-height: 60px; /* Vertically center the text there */
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,9 +26,6 @@ body {
|
|||||||
body > .container {
|
body > .container {
|
||||||
padding: 60px 15px 0;
|
padding: 60px 15px 0;
|
||||||
}
|
}
|
||||||
.container .text-muted {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer > .container {
|
.footer > .container {
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<!-- Begin page content -->
|
<!-- Begin page content -->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="page-header">
|
<div class="page-header m-t">
|
||||||
<h1>Sticky footer</h1>
|
<h1>Sticky footer</h1>
|
||||||
</div>
|
</div>
|
||||||
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
|
<p class="lead">Pin a fixed-height footer to the bottom of the viewport in desktop browsers with this custom HTML and CSS.</p>
|
||||||
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<p class="text-muted">Place sticky footer content here.</p>
|
<span class="text-muted">Place sticky footer content here.</span>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ body {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
/* Set the fixed height of the footer here */
|
/* Set the fixed height of the footer here */
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
line-height: 60px; /* Vertically center the text there */
|
||||||
background-color: #f5f5f5;
|
background-color: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +28,3 @@ body {
|
|||||||
max-width: 680px;
|
max-width: 680px;
|
||||||
padding: 0 15px;
|
padding: 0 15px;
|
||||||
}
|
}
|
||||||
.container .text-muted {
|
|
||||||
margin: 20px 0;
|
|
||||||
}
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user