Struggling with transforming a content box on my webpage. I have a div containing three overlapping images positioned using Grid, and I want to scale one of them to fill the entire div when scrolled over. While I managed to achieve this effect, I'm unable to animate the transition. Is there a way to animate this scaling effect? Regardless if it's related to the grid system or not.
<div
class="project-box-main"
@mousewheel="onScroll"
>
<div class="project-image project-top-image">
<img src="@/assets/img/1_top.png" />
</div>
<div class="project-image project-right-image">
<img src="@/assets/img/1_right.png" />
</div>
<div class="project-image project-main-image"
:class="{ fillWithMainImage: scrollPosition > 0 }">
<img src="@/assets/img/1_main.png" />
</div>
</div>
.project-top-image {
grid-column: 4 / 15;
grid-row: 1 / 10;
}
.project-right-image {
grid-column: 14 / 18;
grid-row: 3 / 13;
}
.project-main-image {
grid-column: 6 / 17;
grid-row: 8 / 20;
}
.fillWithMainImage img{
grid-column: 1 / 21;
grid-row: 1 / 21;
}