Good day. Implemented language switching, as shown in the pictures. It is necessary to add smooth animation to the appearance of hidden languages ​​when clicked. 
function openLangs() { var el = document.getElementById("drop-lang"); if (el.style.display == "none" || !el.style.display) { el.style.display = "inline"; el.classList.add("slideRight"); } else { el.style.display = "none"; el.classList.remove("slideRight"); } } .slideRight { animation-name: slideRight; -webkit-animation-name: slideRight; animation-duration: 1s; -webkit-animation-duration: 1s; animation-timing-function: ease-in-out; -webkit-animation-timing-function: ease-in-out; visibility: visible !important; } @keyframes slideRight { 0% { transform: translateX(-25%); } 100% { transform: translateX(0%); } } @-webkit-keyframes slideRight { 0% { -webkit-transform: translateX(-25%); } 100% { -webkit-transform: translateX(0%); } } <div class="lang" onclick="openLangs()"> <a class="dropdown-lang"> <img src="img/icons/en.png" alt=""> </a> </div> <div id="drop-lang"> <a href="#"><img src="img/icons/gm.png" alt=""></a> <a href="#"><img src="img/icons/rus.png" alt=""></a> </div> At the moment, the animation style is added, but the animation itself is not visible. How can I start the animation when the display property changes to "inline"?
