I've got a script that adds an animation to elements with their individual offsets so they fade in one by one.
/*eslint-env es6*/
$(document).ready(function(){
const selectCategory = document.getElementsByClassName("home-select-category-icon");
for (var i = 0; i < selectCategory.length; i++) {
selectCategory[i].style.animation = `fadeInCategory 2s ease-out ${ i/2+1 }s 1 forwards`;
}
});
I also have some css that expands the scale of the element when you mouse over it (using :hover), and i added a transition in css too.
After everything has faded in, the transition works for a short amount of time, before it returning to no transition and the transition between the scaled and non scaled element is snappy.
I want to have a transition between the scaled element and the non scaled element, but after every fade inanimation is finished, there is no transition whatsoever.
I've looked all over to find answers and I'm stuck, I've spent ages searching to find answers and none of them seem to work for me.
Any help is appreciated, thanks a lot
fadeInCategorycss animation (remove the transform) to something likemargin-top: -30px@ 0% andmargin-top: 0@ 60% and see if you get better results. margin-top also might not be the best replacement... maybetop?