Hosting Solutions
mobile_logo Table of Contents

Folding Content Nav Menu CSS3 Animation JavaScript Tutorial

Learn to create various folding content effects with click triggers and toggle mechanisms. Learning these visual effects can greatly enhance your front-end design work. The best part is that it's so simple to do, that no 3rd party frameworks or libraries are needed. The code is slim, and the visual effects are awesome. CSS3 Property List example.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <style> body { margin: 0px; } #topbar { background: #555; height: 70px; } #menu1btn { float:left; margin:15px 0px 0px 20px; padding: 10px; } #menu1 { position: absolute; left: 20px; background: #333; width: 140px; height: auto; padding: 0px 2px 2px 2px; z-index: 10; transform-origin: 50% 0%; transform: perspective(800px) rotateX(90deg); transition: transform .3s linear 0s; } #menu1 > a { display: block; text-decoration: none; color: #FFF; background:#666; padding: 12px 0px 12px 12px; margin: 1px; font-family: Arial; font-size: 13px; transition: background 0.2s linear 0s, color 0.2s linear 0s; } #menu1 > a:hover { background:#888; color:#FFF; } </style> <script> function toggleMenu(menu){ var menu = document.getElementById(menu); if(menu.dataset.opened == "no"){ = "perspective(800px) rotateX(0deg)"; menu.dataset.opened = "yes"; return false; } else { = "perspective(800px) rotateX(90deg)"; menu.dataset.opened = "no"; } } </script> </head> <body> <div id="topbar"> <button id="menu1btn" onclick="toggleMenu('menu1')">Menu</button> </div> <nav id="menu1" class="folding_menu" data-opened="no"> <a href="#">Section A</a> <a href="#">Section B</a> <a href="#">Section C</a> <a href="#">Section D</a> </nav> </body> </html>

CSS Videos

Animation Rigging

Holiday Christmas Lights Animation Tutorial CSS JavaScriptParallax Effect Animation Multiple Background CSS TutorialBackground Position keyframes Animation CSS TutorialFolding Content Nav Menu CSS3 Animation JavaScript TutorialPure CSS Animated Menu Button Transitionskeyframes Animation Tutorial Floating ElementsAnimated Repeating Tile Background keyframes TutorialFlip 3D Boxes and Cards Animation CSS TutorialFlash and Pulse Effects keyframes Animation TutorialImage Zoom Effect Animation CSS3 HTML Tutorial