navigation

revision:


high-end navigation system


code:
            <div class="navigation">
                <div class="wrapper active-element">
                    <header class="main-header">
                        <nav>
                            <div class="master-head active-element">
                                <h1><a href="#0">Branding</a></h1>
                                <div id="menu-toggle" class="menu-toggle active-element">
                                    <div class="one"></div>
                                    <div class="two"></div>
                                    <div class="three"></div>
                                </div>
                            </div>
                            <div class="main-nav-list active-element">
                                <ul>
                                    <li><a href="#0">Demo Reel</a></li>
                                    <li><a href="#0">Faces</a></li>
                                    <li><a href="#0" class="mobile-hide">Blog</a></li>
                                    <li><a href="#0" class="active-link">About</a></li>
                                    <li><a href="#0">Contact</a></li>
                                </ul>
                            </div>
                        </nav>
                    </header>
                    <main class="main-contents">
                        <h2>About</h2>
                        <p>this works!! Result of a lot of trials and errors!!</p><br>
                        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum labore cumque, laborum, dolorem dolor doloribus iste qui omnis? Consequuntur sapiente mollitia iure quas. 
                        Rem nobis tenetur, est accusamus iste dolor, necessitatibus, facilis error ratione aliquid sequi voluptates dignissimos. Quidem, quam, rem? Molestias odio, perferendis dolores 
                        doloremque eum quo mollitia atque, sit inventore nisi accusamus magnam vitae temporibus maxime et in aliquam qui aliquid obcaecati alias unde repellat laudantium quam blanditiis. 
                        Blanditiis, earum itaque veritatis et numquam culpa, tempore magnam. Quas laborum voluptate id vero. Voluptatibus! Lorem ipsum dolor sit amet consectetur adipisicing elit. 
                        Itaque nemo reprehenderit nostrum nesciunt, deleniti facere voluptas eligendi expedita dolor at praesentium sequi. Accusamus vitae ut necessitatibus aut, repudiandae voluptate! 
                        Excepturi quam explicabo quis illo, qui a ipsam sit atque non sed doloribus maiores in quo ut voluptatem neque animi, saepe facilis nemo et! Temporibus dolores deserunt illo cum 
                        aut saepe tenetur, odit velit ipsum beatae dolore illum accusantium alias ullam quas reiciendis! Quod at tenetur sint. Dolorum officia excepturi placeat, facere enim ullam, tempora
                         accusantium culpa voluptates iusto non aperiam beatae ut laboriosam voluptatibus eum corrupti libero, laborum voluptas quasi at fugiat et vel? Eum.</p>
                    </main>
                    <footer class="main-footer active-element"><span class="copyright">©2022</span></footer>
                </div>
        
            </div>
            <style>
                hr{height: 0.5vw;background:linear-gradient(45deg, lightgreen, burlywood, orange);}
                .navigation{background-color:skyblue; width:96vw; height: 100vh;margin-left: 1vw;}
                .wrapper{display: flex; flex-direction: column; height: 100vh; top:10; margin: 0 auto; max-width: 96vw; padding-top: .5vw;}
                .main-header a{letter-spacing: .38vw; text-transform: uppercase;font-size:xx-large;}
                .master-head{ position: relative; z-index: 1000; top: 0; left: 0; width: 100%; align-items: baseline; display: flex; justify-content: space-between; }
                .master-head h1{transition-delay: 450ms;}
                .menu-toggle{cursor: pointer; width: 5.5vw; z-index: 3;}
                .menu-toggle div{background-color: seagreen; border-radius: 2.5vw; box-shadow: 0px 3px 13px rgba(0,0,0,.3); height: .7vw; transition-duration: 250ms; 
                    transition-timing-function: cubic-bezier(.13,.24,.35,1.64);}
                .menu-toggle .one, .menu-toggle .two{margin-bottom: .7vw;}
                .main-contents{flex: auto;}
                .main-contents h2{letter-spacing: 0.6vw;  margin-bottom: .6vw; text-transform: uppercase;}
                .main-contents p{font-size: 1.1vw; letter-spacing: 0.1vw; line-height: 1.35; color: skyblue; transition-delay: 150ms; transition-duration: 850ms;}
                .main-footer span{transition-delay: 150ms; transition-duration: 1350ms;}
                .main-footer{font-size: 1vw; letter-spacing: .18vw; margin-bottom: 1.5vw; margin-top: 4vw;      text-align: center; text-transform: uppercase;}
                .main-nav-list::before,.main-nav-list::after{background-color:coral; content:"";position: absolute; top: 12vw; height: 100vh; width: 0vw; margin: 1.5vw; transition: all 100ms ease-in-out 300ms;}
                .main-nav-list::before{left: 0;}
                .main-nav-list::after{right: 0;}
                .main-nav-list ul{position: absolute;top: -40%; left: 50%; transform: translate(-50%,-50%); transition-duration: 300ms; transition-timing-function: ease-in-out; z-index: 2000;}
                .main-nav-list a{display: block; font-size: 2vw; letter-spacing: 0.1vw; margin-bottom: 1.5vw;   opacity: 0; text-align: center; text-transform: uppercase; transition-delay: 130ms;}
                .main-nav-list .mobile-hide{display: none;}
                .master-head.active h1{text-shadow: 0vw .3vw .3vw rgba(0,0,0,.4);}
                .menu-toggle.active .one{box-shadow: 0px 3px 1.3vw rgba(0,0,0,.4); transform: translate(0, 1.8vw) rotate(45deg);}
                .menu-toggle.active .two{background-color: transparent;box-shadow: none;transform: translateX(-5.5vw);}
                .menu-toggle.active .three{box-shadow: 0px 3px 1.3vw rgba(0,0,0,.4); transform: translate(0,-.8vw) rotate(-45deg);}
                .main-nav-list.active::before, .main-nav-list.active::after{ width: 25vw;}
                .main-nav-list.active ul{top: 70%; transform: translate(-50%,-50%); transition-delay: 560ms;  transition-duration: 240ms; transition-timing-function: cubic-bezier(.1, .2, .3, 1.4);}
                .main-nav-list.active a{ transition-delay: 600ms; opacity: 1; }
                .wrapper.active p{color: black; transition-delay: 150ms; transition-duration: 350ms;}
                .main-footer.active span{color: red; transition-duration: 350ms;}
            </style>
            <script>
                var menuToggle = document.querySelector("#menu-toggle");
                var activeElements = document.querySelectorAll(".active-element");
                var toggledMenu = menuToggle.addEventListener("click", function(){
                    // forEach is not supported in IE11
                // activeElements.forEach(function(e){
                //     e.classList.toggle("active");
                // });
                for(var activated = 0; activated < activeElements.length; activated++){
                   activeElements[activated].classList.toggle("active");
                    }
                })
            </script>