When I hover or click on one of the carousel items, they change to a darker color than their original appearance. I want them to maintain the same color in both states, but I'm struggling to make this adjustment. I've experimented with changing the color and background properties, but nothing seems to work.
Any assistance for this beginner would be greatly appreciated!
.container {
padding: 15rem;
}
.wrapper {
background-color: pink;
width: 20rem;
margin: 0 auto;
}
.carousel-inner {
min-height: 150px;
}
.carousel-item {
margin-block-start: 3.5rem;
}
p {
text-align: center;
margin: 0 2rem;
}
.carousel-indicators {
display: none !important;
}
.carousel-icon {
height: 20%;
width: 20%;
margin-bottom: 1rem;
filter: invert(50%);
}
.carousel-icon:link,
.carousel-icon:visited,
.carousel-icon:hover,
.carousel-icon:active, {
/* color: red; */
/* background-color: red; */
background: red;
}
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Carousel</title>
<link rel="stylesheet" type="text/css" href="style-carousel.css">
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css"integrity = "sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin = "anonymous">
</head>
<body>
<!-- jQuery Library -->
<script src = "https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity = "sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin = "anonymous">
</script>
<!-- Popper -->
<script src = "https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity = "sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin = "anonymous">
</script>
<!-- Compiled and Minified Bootstrap JavaScript -->
<script src = "https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity = "sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin = "anonymous">
</script>
<div class="container">
<div class="wrapper">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="myCarousel" data-slide-to="0" class="active"></li>
<li data-target="myCarousel" data-slide-to="1"></li>
<li data-target="myCarousel" data-slide-to="2"></li>
<li data-target="myCarousel" data-slide-to="3"></li>
<li data-target="myCarousel" data-slide-to="4"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<p>"Lorem ipsum dolor sit amet."</p>
</div>
<div class="carousel-item">
<p>"In ornare quam viverra orci sagittis eu volutpat odio facilisis."</p>
</div>
<div class="carousel-item">
<p>"Ullamcorper dignissim cras tincidunt lobortis."</p>
</div>
<div class="carousel-item">
<p>"Sed velit dignissim sodales."</p>
</div>
</div>
<a class="carousel-control-prev" href="#myCarousel" data-slide="prev">
<span class="carousel-control-prev-icon carousel-icon"></span>
</a>
<a class="carousel-control-next" href="#myCarousel" data-slide="next">
<span class="carousel-control-next-icon carousel-icon"></span>
</a>
</div>
</div>
</div>
</body>
</html>