This is a tutorial for beginner and intermediate HTML5 and CSS3 developers who want to create a drop-down menu. Today we will continue making nice menus for you. Here is a cool nested drop-down navigation menu that uses only CSS for animation. It's a story uniting… twitter.com/i/web/status/1…. Published on 8.June 2019 Last updated on 23. Solution: Rather than wrapping up your inner menu links inside the li.test1 you can work with two different li, One for the X CLose and other for holding the menu links.With this in place we can make sure when ever the li.test1 is active (ie mouse is down) we can hide it and also the other new li which is adjacent to it. Test your JavaScript, CSS, HTML or CoffeeScript online with JSFiddle code editor. Below are five animations using CSS transforms for both the whole menu and each item individually. This is the seventh post in a series examining modern CSS solutions to problems I've been solving over the last 13+ years of being a frontend developer. I've added a new hall of fame entry to your profile: halls-of-valhalla.org/beta/user/rubi…, Some great talks at @gopherconuk In our case, we are animating the menu from the closed state to the open state. Learn how to create CSS down slide animation on click using nothing by HTML and CSS. And now I'm going to create an Advanced Drop-down Menu Animation. Users can submit code, as well as science, technology, and engineering-oriented news and articles. Mostly – this is UL-LI based menus. The animation-duration almost remain the same for all the menus, but the animation-delay will modify like for second menu item, the delay will be 150ms whereas the delay is zero for the first menu item. To animate the menu we need to add the animation property to the dropdown_menu. The animation-name property should be set the name we give to the @keyframes rule, in this case, growDown. Multi-level CSS3 dropdown menu tutorial. It was designed by Gabrielle Wee. We could manually write a CSS selector for each dropdown menu item with a different animation-delay or we can take advantage of Stylus’s for loop to iterate over each and generate those selectors automatically. Use any element to open the dropdown menu, e.g. Tip: If you want the width of the dropdown content to be as wide as the dropdown button, set the width to 100% (and overflow:auto to enable scroll on small screens). We do this is because we don’t want all menu items to be visible immediately, like we did when animating the whole menu. The End Result Perfect! -webkit-animation-play-state: paused; to your CSS file, then you can control whether the animation is running or not by using this JS line: document.getElementById("myDIV").style.WebkitAnimationPlayState = "running"; if you want the animation to run once, every time you click. Visit ModernCSS.dev to view the whole series and additional resources. Full CSS dropdown navigation. The plugin also provides a fallback to animate the menu using jQuery when CSS transitions are not supported. a