I am working on a layout where an image is displayed in a col-8 next to 4 icons and a paragraph in a col-4. I want to keep the formatting consistent on this page. Specifically, I would like the image linked to the first icon to automatically display when the page loads. Then, when the user hovers over the other three icons, I want the corresponding images to replace the initial one.
If anyone has a solution or can point me towards a helpful resource, such as a video or article, I would greatly appreciate it. Unfortunately, I had to remove some code related to the svg icons for ease of reading and file size constraints, but you should get the gist of it. https://i.sstatic.net/u13pz.jpg
HTML
<div class="container-right">
<div class="row pb-5 pt-3">
<div class="col-4 ">
<h1 class="pb-2 text-center text-md-left">Products</h1>
<b>Customer satisfaction is a top priority. At Hills Industrial, we want our customers to be astounded with the choices we offer, excited by the innovation we provide and satisfied with our service and reliability. Providing superior customer experience in a consistent manner is our primary goal.</b>
<div class="row mt-4">
<!-- Controls -->
<div class="col-5">
<a href="#"><div class="icon-background"><svg class="product-icon" </svg></div></a>
</div>
(Icons continuation omitted for brevity)
</div>
</div>
<div class="col-8">
<img src="img/motor-stock.jpg" class="product-photo"></img>
</div>
</div>
</div>
CSS
.product-icon{
width:50px;
fill: #ffff;
transition:fill 0.3s ease-out;
}
.icon-background:hover .product-icon{
fill: #fb0203;
}
.product-photo{
border-radius:400px 0px 0px 400px ;
max-width: 1000px;
height: 100%;
}
.container-right {
padding-left: 15px;
/* padding-right: 15px; */
}
(Media queries and CSS classes continue for responsiveness and styling)