How can I delay the appearance of mobile nav items without using JS until the nav overlay fully expands for 0.4s?
In the non-overlay state, the top nav has a hamburger menu on the left and my name on the right with hidden nav links.
When in the overlay state, the hamburger menu changes to an x, the top nav covers the full page, and centralized nav links appear on the overlay.
Is it true that modern browsers will ignore animation or transition specifications if display: changes? How can I overcome this issue and delay the appearance of nav items until the overlay is fully expanded?
I found a working example here: https://codepen.io/KingKabir/pen/QyPwgG, but I'm unsure about their method?
I've attempted using visibility: and opacity: but they don't properly hide the nav elements in the non-overlay state, affecting the positioning of my name on the right side of the nav menu.
What adjustments should be made to ensure the nav elements only appear after the overlay has fully expanded?
View code snippets below:
<nav class="nav_container" id="overlay">
(HTML content)
</nav>
.cssstyles {
/* CSS styles */
}
Javascript snippet included for reference:
function mobileMenu() {
// Javascript function
}
The desired outcome is for the nav_tab elements to appear after the full expansion of nav_container. However, currently, they appear prematurely before the full expansion occurs.