📅  最后修改于: 2023-12-03 15:02:27.817000             🧑  作者: Mango
Jumbotron Bootstrap is a UI (User Interface) component provided by Bootstrap that allows you to display a large section of content in an attractive manner. It can be used as a header, or for showcasing a product or service.
To use Jumbotron Bootstrap, you need to know a basic knowledge of HTML and CSS. You also need to download and include the Bootstrap CSS and JS files in your project.
<!-- Include the Bootstrap CSS file -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<!-- Include the Bootstrap JS files -->
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
To create a Jumbotron, you need to use the <div>
tag with the class jumbotron
. You can also add other classes to customize the Jumbotron to your liking.
<div class="jumbotron">
<h1>Hello, World!</h1>
<p>Welcome to my website.</p>
</div>
You can add a background image to the Jumbotron by using the background-image
CSS property.
<div class="jumbotron" style="background-image: url('image.jpg');">
<h1>Hello, World!</h1>
<p>Welcome to my website.</p>
</div>
You can add a button to the Jumbotron by using the <a>
tag with the class btn
and btn-primary
.
<div class="jumbotron">
<h1>Hello, World!</h1>
<p>Welcome to my website.</p>
<a href="#" class="btn btn-primary">Learn More</a>
</div>
In conclusion, Jumbotron Bootstrap is a simple and effective way to showcase large sections of content on your website. By using Jumbotron, you can create a professional and attractive website in no time.