Bootstrap Jumbotron With Image Background

Code Snippet:Jumbotron Parallax Image Background
Author: waltir.
Published: 3 weeks ago
Last Updated: October 27, 2025
Downloads: 50
License: MIT
Edit Code online: View on CodePen
Read More

This tutorial will guide you through the process of creating a visually appealing Bootstrap Jumbotron with an image background, enhancing your website’s header section.

Adding Bootstrap CSS

This step involves including the Bootstrap CSS file in the section of your HTML document. This will provide the necessary styling and components for the jumbotron.

<link rel=’stylesheet’ href=’https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/css/bootstrap.min.css’>

Creating the HTML Structure

Next, we’ll build the HTML structure for the jumbotron. This includes the main `div` element with the appropriate Bootstrap classes, a container for the content, a heading, a paragraph, and a button. A “page-scroll” div is also added for demonstration purposes.

<div class="jumbotron jumbotron-fluid">
  <div class="container">
    <h1 class="display-2">Fluid jumbotron.</h1>
    <p class="lead">This is a modified jumbotron that occupies the entire horizontal space of its parent.</p>
    <button class="btn btn-outline-danger">This is a Button</button>
  </div>
</div>
<div class="page-scroll">

Styling the Jumbotron with CSS

Now, we’ll use CSS to customize the appearance of the jumbotron. This includes setting the background image, applying a gradient overlay, adjusting the text color, and styling the button.

.jumbotron{
  margin:15px 30px 0px 30px;
  border-radius:10px;
    background: 
linear-gradient(
  rgba(0, 0, 250, 0.25), 
  rgba(125, 250, 250, 0.45)
),
url(https://source.unsplash.com/1600x1050/?nature);
background-repeat: no-repeat;
background-attachment: fixed;
color:white !important;
height:340px;
}

.page-scroll{
  height:5000px;
}

.btn-outline-danger{
  color:white;
  border-color:white;
  border-radius:0px;
  font-weight:100;
  margin-top:20px;
}
.lead{
  font-family:raleway;
  font-weight:100;
  margin-top:-10px;
}

Final Result

By following the steps outlined in this tutorial, you have successfully created a Bootstrap Jumbotron with Image Background. If you have any questions or suggestions, feel free to comment.

Related posts:

Loading... ...

Loading preview...

Device: Desktop
Dimensions: 1200x800
Lines: 0 Characters: 0 Ln 1, Ch 1

Leave a Comment

About W3Frontend

W3Frontend provides free, open-source web design code and scripts to help developers and designers build faster. Every snippet is reviewed before publishing for quality. Learn more.