I am currently working with Bootstrap v4 to build a carousel featuring an image with caption text. My goal is to have the image faded while leaving the text unaffected. Despite trying several non-Bootstrap solutions, I have been unsuccessful in achieving the desired effect. Any assistance would be greatly appreciated :(
Here is the link to the development site:
Below is the code snippet:
<div id="home-page-carousel" class="carousel slide" data-ride="carousel">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#home-page-carousel" data-slide-to="0" class="active"></li>
<li data-target="#home-page-carousel" data-slide-to="1"></li>
</ol>
<!-- Content -->
<div class="carousel-inner" role="listbox">
<!-- Slide 1 -->
<div class="carousel-item active"> <img src="<?php echo SITE_IMG . 'L1.jpg'; ?>" alt="Liverpool City Centre">
<div class="carousel-caption">
<h3>This is a title</h3>
<p>This is some text that is relevant to the title above</p>
</div>
</div>
<!-- Slide 2 -->
<div class="carousel-item"> <img src="<?php echo SITE_IMG . 'L1.jpg'; ?>" alt="Liverpool City Centre">
<div class="carousel-caption">
<h3>This is a title</h3>
<p>This is some text that is relevant to the title above</p>
</div>
</div>
</div>
<!-- Previous/Next controls -->
<a class="left carousel-control" href="#home-page-carousel" role="button" data-slide="prev"> <span class="icon-prev" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#home-page-carousel" role="button" data-slide="next"> <span class="icon-next" aria-hidden="true"></span> <span class="sr-only">Next</span> </a> </div>
<!-- Center the image -->
<style scoped>
.carousel-item img{
margin: 0 auto;
}
</style>