So I have a grid of elements and I have set them to fade in one after the other on page load.
So they have a 0.2s delay from one element to the next fading in from opacity 0 to opacity 1.
I then want images in these elements to grow when there grid section is highlighted, but my animation-fill-mode is preventing this.
Any work arounds?
//Expand when hover over.
.main-image {
transition: transform .2s ease-in-out;
}
#portfolio:hover #portfolio-image {
transform: scale(1.1);
}
// Fade in with delay
@keyframes fadeInFromAbove {
0% {
transform: translateY(-30%);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
#portfolio .main-image {
opacity: 0;
animation: 0.5s ease-out 0.2s 1 fadeInFromAbove;
animation-fill-mode: forwards;
}
HTML formatting:
<div id='portfolio' class='main-block'>
<div id='portfolio-image' class='main-image'></div>
</div>