Vertical Accordeon Menu
How do I make an vertical accordeon menu?
What is a vertical accordeon menu? How do you make a vertical accordeon menu? This script and codes were developed by Kévin Joffard on 11 October 2022, Tuesday.
Vertical Accordeon Menu - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Vertical Accordeon Menu</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <body> <nav> <ul> <li class="vertical-menu-item">ONE</li> <li class="vertical-menu-item">TWO</li> <li class="vertical-menu-item">THREE</li> <li class="vertical-menu-item">FOUR</li> <li class="vertical-menu-item">FIVE</li> </ul> </nav> <section> <div class="container"> <div class="default enabled"> <H1>ITEM BY DEFAULT</H1> </div> <div class="disabled"> <H1>ITEM BY DISABLED 1</H1> </div> <div class="disabled"> <H1>ITEM BY DISABLED 2</H1> </div> <div class="disabled"> <H1>ITEM BY DISABLED 3</H1> </div> <div class="disabled"> <H1>ITEM BY DISABLED 4</H1> </div> </div> </section>
</body> <script src="js/index.js"></script>
</body>
</html>
Vertical Accordeon Menu - Script Codes CSS Codes
* { padding: 0; margin: 0; font: 20px/14px Verdana;
}
nav { width: 20%; height: 100vh; background: #071D49; color: #FFF; display: inline-block; float: left;
}
.vertical-menu-item { height: calc(100%/5); padding: 50px; border-top: 1px solid #FFF;
}
.vertical-menu-item:first-child { border-top: 0;
}
.vertical-menu-item::after { position: absolute; left: 16%; content: '>';
}
.vertical-menu-item:hover { animation: navAnimation .5s; animation-fill-mode: forwards;
}
.vertical-menu-item:hover::after { animation: arrowAnimation .5s; animation-fill-mode: forwards;
}
section { height: 100vh; width: 80%; background: #EFF0F2; float: right;
}
.container { margin: 50px;
}
.default,
.enabled { animation: sectionAnimation .5s; animation-fill-mode: forwards;
}
.disabled { opacity: 0;
}
H1 { font-size: 36px;
} /* ANIMATIONS */
@keyframes navAnimation { from { background: #071D49; color: #FFF; } to { background: #FFC72C; color: #071D49; }
}
@keyframes arrowAnimation { from { left: 16%; } to { left: 17%; }
}
@keyframes sectionAnimationIn { from { opacity: 0; } to { opacity: 1; }
}
Vertical Accordeon Menu - Script Codes JS Codes
const handleClick = (e) => { e.preventDefault(); const active = document.querySelector('.enabled'); if(active){ active.classList.remove('enabled'); active.classList.add('disabled'); } e.currentTarget.classList.add('enabled');
}
![Vertical Accordeon Menu - Script Codes](http://shots.codepen.io/kejoff/pen/RpEQYO-512.jpg)
Developer | Kévin Joffard |
Username | kejoff |
Uploaded | October 11, 2022 |
Rating | 3 |
Size | 2,226 Kb |
Views | 14,168 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Landing Page 3 columns oblique | 3,251 Kb |
Footer new generation | 3,069 Kb |
Experimentation - Gmaps Colors | 2,757 Kb |
Product Page | 6,544 Kb |
Footer Grid | 2,023 Kb |
Grid 2 columns test | 1,710 Kb |
Animation iFrame Google maps - Vanilla Javascript | 2,322 Kb |
Aframe - Hello Metaverse Testing | 2,235 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Drifting Clouds | Benedikte | 2,247 Kb |
Caputre Cam with JS | KimmoCommit | 2,795 Kb |
3d css cube | Semenchenko | 4,578 Kb |
Animate elements with fixed gradient | Badabam | 4,406 Kb |
Atom | Bhlaird | 1,932 Kb |
Donald Trump - The New Yorker | Agbales | 2,502 Kb |
Cant get enough icecream in pure css3 | Melawire | 4,322 Kb |
Sequence.js - Sliding Horizontal Parallax | Maheshc | 4,537 Kb |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Ball bouncing loading animation | Adam2326 | 3,144 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!