📜  jumbotron - Html (1)

📅  最后修改于: 2023-12-03 15:17:06.531000             🧑  作者: Mango

Jumbotron - HTML

The Jumbotron is a flexible and dynamic component available in Bootstrap framework. It allows you to create a large callout section on your web page that immediately grabs your visitors' attention. The Jumbotron component can be used to highlight key features, promotions, or any other important information that you want to convey to your users.

Getting Started

To use the Jumbotron component in your web page, you need to include Bootstrap's CSS and JavaScript files in your project. You can either download the files from the Bootstrap website or use a content delivery network (CDN) to include the files in your project.

CDN
<!-- CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">

<!-- JS -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkf01tg/9TpT6jrwFhsIlKpuvzs2lFpnwPb+aLbK7h"
crossorigin="anonymous"></script>
Downloading files

You can also download the CSS and JavaScript files from the Bootstrap website and include them in your project:

<!-- CSS -->
<link rel="stylesheet" href="/path/to/bootstrap.min.css">

<!-- JS -->
<script src="/path/to/bootstrap.min.js"></script>
Usage

Once you have included the Bootstrap CSS and JavaScript files, you can start using the Jumbotron component in your web page.

<div class="jumbotron">
  <h1>Hello, world!</h1>
  <p>This is a simple Jumbotron-based web page.</p>
  <p><a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a></p>
</div>
Output

Jumbotron Output

Customization

You can customize the Jumbotron component by modifying its CSS properties or by using the built-in classes provided by Bootstrap.

Modifying CSS
.jumbotron {
  background-color: #f9f9f9;
  color: #333;
  padding: 100px 25px;
}
Using Built-in Classes
<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-4">Fluid Jumbotron</h1>
    <p class="lead">This Jumbotron takes up the full width of the screen.</p>
  </div>
</div>
Output

Jumbotron Customization Output

Conclusion

The Jumbotron component is a powerful tool that can help you create visually appealing callout sections on your web page. With its flexibility and customization options, you can design a Jumbotron that fits the needs of your project.