Hello there,
I've been tinkering with the bootstrap website and I'm looking to add an inset shadow effect to the carousel. Here's a snippet of the HTML:
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img src="..." alt="First slide">
</div>
<div class="carousel-item">
<img src="..." alt="Second slide">
</div>
<div class="carousel-item">
<img src="..." alt="Third slide">
</div>
</div>
<a class="left carousel-control" href="#carousel-example-generic" 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="#carousel-example-generic" role="button" data-slide="next">
<span class="icon-next" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
I've attempted to add the effect using the following CSS:
.carousel-item {
box-shadow: inset 0 0 20rem rgba(0,0,0,1);
}
.carousel-item img {
z-index: -1;
}
(and a couple of other methods that didn't produce the desired result).
Does anyone have any suggestions on how to resolve this issue?