Backgrounds
Choose backgrounds to create visually captivating and interactive web experiences.
Background Image
Image Background
<div class="position-relative py-6 py-md-8">
<div class="bg-holder" style="background-image:url(../assets/img/header-01.jpg);"></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h4 class="text-white">Image Background</h4>
</div>
</div>
Parallax Backgrounds
Use data-parallax
and .bg-holder
class and .has-parallax
to it's parent for effect.
JavaScript
<script src="vendors/rellax/rellax.js"></script>
Image Background Parallax
<div class="py-6 py-md-8 has-parallax">
<div class="bg-holder overlay overlay-2 vh-100" style="background-image:url(../assets/img/header-01.jpg);" data-rellax-speed="-5" data-parallax="data-parallax"></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Image Background Parallax</h5>
</div>
</div>
Video Background Parallax
<div class="py-6 py-md-8 has-parallax">
<div class="bg-holder overlay overlay-2 vh-100" style="background-image:url(../assets/videos/beach.jpg);" data-rellax-speed="-5" data-parallax="data-parallax"><video class="bg-video" autoplay="autoplay" loop="loop" muted="muted" playsinline="playsinline">
<source src="../assets/videos/beach.mp4" type="video/mp4" />
</video></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Video Background Parallax </h5>
</div>
</div>
Video Background
Video Background
<div class="position-relative">
<div class="bg-holder overlay" style="background-image:url(../assets/videos/beach.jpg);"><video class="bg-video" autoplay="autoplay" loop="loop" muted="muted" playsinline="playsinline">
<source src="../assets/videos/beach.mp4" type="video/mp4" />
</video></div> <!--/.bg-holder-->
<div class="position-relative py-6 py-md-8 d-flex flex-center">
<h4 class="text-white">Video Background</h4>
</div>
</div>
Youtube Video
Youtube Video Background
<div class="position-relative overflow-hidden h-100 w-100">
<div class="bg-holder bg-youtube" style="background-image:url(http://img.youtube.com/vi/teLhLLlhfzc/maxresdefault.jpg);">
<div class="bg-youtube" data-youtube-embed='{"videoId":"teLhLLlhfzc","startSeconds":0,"endSeconds":444}'></div>
</div> <!--/.bg-holder-->
<div class="position-relative py-6 py-md-8 d-flex flex-center text-center">
<h4 class="text-white">Youtube Video Background</h4>
</div>
</div>
Shades of overlay
Use following classes with .overlay
class for different shades.
Image Background
(.overlay)
Image Background
(.overlay-0)
Image Background
(.overlay-1)
Youtube Background
(.overlay-2)
<div class="row g-4">
<div class="col-sm-6">
<div class="position-relative py-7">
<div class="bg-holder overlay" style="background-image:url(../assets/img/header-01.jpg);"></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Image Background </h5>
<h6 class="text-white">(.overlay)</h6>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative py-7">
<div class="bg-holder overlay overlay-0" style="background-image:url(../assets/img/header-01.jpg);"></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Image Background </h5>
<h6 class="text-white">(.overlay-0)</h6>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative py-7">
<div class="bg-holder overlay overlay-1" style="background-image:url(../assets/img/header-01.jpg);"></div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Image Background </h5>
<h6 class="text-white">(.overlay-1)</h6>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="position-relative py-7">
<div class="bg-holder overlay overlay-2" style="background-image:url(http://img.youtube.com/vi/teLhLLlhfzc/maxresdefault.jpg);">
<div class="bg-youtube" data-youtube-embed='{"videoId":"teLhLLlhfzc","startSeconds":0,"endSeconds":444}'></div>
</div> <!--/.bg-holder-->
<div class="position-relative text-center">
<h5 class="text-white">Youtube Background</h5>
<h6 class="text-white">(.overlay-2)</h6>
</div>
</div>
</div>
</div>