mirror of
https://github.com/twbs/bootstrap.git
synced 2025-02-23 09:41:11 +00:00
tweak and improve jumbotrons
This commit is contained in:
parent
49ac4ea0fa
commit
b873edce8e
@ -3,7 +3,7 @@ layout: page
|
|||||||
title: Jumbotron
|
title: Jumbotron
|
||||||
---
|
---
|
||||||
|
|
||||||
A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site.
|
A lightweight, flexible component that can optionally extend the entire viewport to showcase key marketing messages on your site.
|
||||||
|
|
||||||
{% example html %}
|
{% example html %}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron">
|
||||||
@ -13,15 +13,16 @@ A lightweight, flexible component that can optionally extend the entire viewport
|
|||||||
</div>
|
</div>
|
||||||
{% endexample %}
|
{% endexample %}
|
||||||
|
|
||||||
To make the jumbotron full width, and without rounded corners, place it outside all `.container`s and instead add a `.container` within.
|
To make the jumbotron full width, and without rounded corners, add the `.jumbotron-fluid` modifier class and add a `.container` or `.container-fluid` within.
|
||||||
|
|
||||||
{% highlight html %}
|
{% example html %}
|
||||||
<div class="jumbotron">
|
<div class="jumbotron jumbotron-fluid">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
...
|
<h1 class="jumbotron-heading">Fluid jumbotron</h1>
|
||||||
|
<p class="lead">This is a modified jumbotron that occupies the entire horizontal space of it's parent.</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endhighlight %}
|
{% endexample %}
|
||||||
|
|
||||||
Jumbotrons also come with an adaptive `hr`—just add `.jumbotron-hr` to the element and the `border-top-color` will be tinted based on the jumbotron background.
|
Jumbotrons also come with an adaptive `hr`—just add `.jumbotron-hr` to the element and the `border-top-color` will be tinted based on the jumbotron background.
|
||||||
|
|
||||||
|
@ -8,11 +8,7 @@
|
|||||||
margin-bottom: $jumbotron-padding;
|
margin-bottom: $jumbotron-padding;
|
||||||
color: $jumbotron-color;
|
color: $jumbotron-color;
|
||||||
background-color: $jumbotron-bg;
|
background-color: $jumbotron-bg;
|
||||||
|
@include border-radius($border-radius-lg);
|
||||||
.container &,
|
|
||||||
.container-fluid & {
|
|
||||||
@include border-radius($border-radius-lg); // Only round corners at higher resolutions if contained in a container
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.jumbotron-heading {
|
.jumbotron-heading {
|
||||||
@ -25,16 +21,16 @@
|
|||||||
|
|
||||||
@include media-sm {
|
@include media-sm {
|
||||||
.jumbotron {
|
.jumbotron {
|
||||||
padding: ($jumbotron-padding * 1.6) 0;
|
padding: ($jumbotron-padding * 2) $jumbotron-padding;
|
||||||
|
|
||||||
.container &,
|
|
||||||
.container-fluid & {
|
|
||||||
padding-right: ($jumbotron-padding * 2);
|
|
||||||
padding-left: ($jumbotron-padding * 2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.jumbotron-heading {
|
.jumbotron-heading {
|
||||||
font-size: ($font-size-base * 4.5);
|
font-size: ($font-size-base * 4.5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jumbotron-fluid {
|
||||||
|
padding-left: 0;
|
||||||
|
padding-right: 0;
|
||||||
|
@include border-radius(0);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user