I've searched through the internet and haven't found any solution for the newest version of bootstrap.
I've thought of two things: Using opacity (didn't work since every other element from the Jumbotron inherits it), and setting a background image whose opacity I thought I could change later (which actually just faded from original to white, still not getting any transparency).
Is there a simple way to do this?
EDIT: A part of my HTML:
<div class="jumbotron">
<h1 class="display-3 text-right">name</h1>
<hr class="my-4 text-right">
<p class="lead text-right">description</p>
<p class="lead text-right">
<a class="btn btn-primary btn-lg" href="#" role="button">Learn more</a>
</p>
</div>
We can add a background image to the jumbotron using the CSS style sheet. Use . background-image : url("image_address") within the stylesheet. Here is an example to add a background image to the jumbotron.
To change that opacity, override --bs-bg-opacity via custom styles or inline styles.
In Bootstrap 5 the jumbotron component is removed in favor of utility classes like . bg-light for the background color and . p-* classes to control padding.
This could help
.jumbotron {
background: rgba(204, 204, 204, 0.5);
}
You could just add bg-transparent in your html
<div class="jumbotron bg-transparent">
...
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With