I have an svg with two different animations; a briefcase hopping up and some speed lines. What I want to happen is when it is hovered over, the animations play. The problem is you have to hover over the solid parts rather than the whole thing. I don't want the outer ring moving, so I can't apply the animations to the whole thing.
For the SVGs that have only one animation for, I've used an circle with an opacity of zero to make them work. This does not work with multiple animations.
/* Animation Code */
.case:hover {
animation: jump 1.5s linear infinite;
position:relative;
top:0;
bottom:0;
left:0;
right:0;
margin:0 auto;
transform-origin: 50% 50%;
}
@keyframes jump{
0% {transform: translate(0,0) ;}
30% {transform: translate(0,-10%) ;}
100% {transform: translate(0,0) ;}
}
.lines:hover {
animation: woosh 1.5s linear infinite;
position:relative;
top:0;
bottom:0;
left:0;
right:0;
margin:0 auto;
transform-origin: 50% 75%;
}
@keyframes woosh{
0%, 5% {
transform: scaleY(0);
}
30% {
transform: scaleY(-1);
opacity: 0.3;
}
55% {
opacity: 0;
}
100% {
transform: scaleY(-1);
opacity: 0;
}
}