0

I have webkit css below to animate my top-menu.I only want to control the height attribute(height:150px) by js,when its 100% which means max-height when its been opened.

 from {
    height:var(--m,0%);
}

Here's my CSS

@-webkit-keyframes expand{
    0%{height:0px}
    100%{height:150px}
}
AHanneman
  • 13
  • 4

1 Answers1

-1

You can use the event animationend: https://www.w3schools.com/jsref/event_animationend.asp

    document.getElementById('yourselector').addEventListener('animationend', e=>console.log('animation ended'),false)
user1521685
  • 210
  • 2
  • 13