Menu handle
How do I make an menu handle?
Reasonably semantic markup and animaions for a menu handle. What is a menu handle? How do you make a menu handle? This script and codes were developed by Aurer on 30 November 2022, Wednesday.
Menu handle - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu handle</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <nav id="navigation"> <button class="MenuHandle" title="Show menu"> <span class="MenuHandle-label">Menu</span> <span class="MenuHandle-bar MenuHandle-bar--one"></span> <span class="MenuHandle-bar MenuHandle-bar--two"></span> <span class="MenuHandle-bar MenuHandle-bar--three"></span>
</button> <a href="#1">Menu item 01</a> <a href="#2">Menu item 02</a> <a href="#3">Menu item 03</a> <a href="#4">Menu item 04</a> <a href="#5">Menu item 05</a>
</nav>
<main>
</main> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Menu handle - Script Codes CSS Codes
body { padding: 2em; color: #555;
}
.MenuHandle { display: inline-block; vertical-align: middle; position: relative; min-width: 28px; min-height: 28px; padding: 0; background-color: transparent; border: none; outline: none; cursor: pointer;
}
.MenuHandle .MenuHandle-label { position: absolute; margin-left: 30px; bottom: 20%; font-size: .9em; -webkit-transition: opacity .3s, -webkit-transform .3s; transition: opacity .3s, -webkit-transform .3s; transition: opacity .3s, transform .3s; transition: opacity .3s, transform .3s, -webkit-transform .3s;
}
.MenuHandle .MenuHandle-bar { position: absolute; left: 0; width: 28px; height: 3px; background-color: #000; background-color: currentColor; -webkit-transform-origin: 50%; transform-origin: 50%; -webkit-transition: opacity .3s, -webkit-transform .3s; transition: opacity .3s, -webkit-transform .3s; transition: transform .3s, opacity .3s; transition: transform .3s, opacity .3s, -webkit-transform .3s;
}
.MenuHandle .MenuHandle-bar--one { top: 5px;
}
.MenuHandle .MenuHandle-bar--two { top: 13px;
}
.MenuHandle .MenuHandle-bar--three { top: 21px;
}
.MenuHandle:hover .MenuHandle-bar--one { -webkit-transform: translateY(8px) scaleX(0.9); transform: translateY(8px) scaleX(0.9);
}
.MenuHandle:hover .MenuHandle-bar--two { -webkit-transform: rotate(-90deg) scaleX(0.9); transform: rotate(-90deg) scaleX(0.9);
}
.MenuHandle:hover .MenuHandle-bar--three { -webkit-transform: translateY(-8px) scaleX(0.9); transform: translateY(-8px) scaleX(0.9);
}
.MenuHandle.is-active .MenuHandle-label { opacity: 0; -webkit-transform: translateX(-50%); transform: translateX(-50%);
}
.MenuHandle.is-active .MenuHandle-bar--one { -webkit-transform: translateY(8px) rotate(-45deg) scale(0.9, 1.5); transform: translateY(8px) rotate(-45deg) scale(0.9, 1.5);
}
.MenuHandle.is-active .MenuHandle-bar--two { -webkit-transform: rotate(-135deg) scale(0.9, 1.5); transform: rotate(-135deg) scale(0.9, 1.5);
}
.MenuHandle.is-active .MenuHandle-bar--three { -webkit-transform: translateY(-8px) rotate(-45deg) scale(0.9, 1.5); transform: translateY(-8px) rotate(-45deg) scale(0.9, 1.5);
}
.MenuHandle--labelHidden .MenuHandle-label { position: absolute; overflow: hidden; clip: rect(0 0 0 0); height: 1px; width: 1px; margin: -1px; padding: 0; border: 0;
}
nav { position: absolute; top: 0; bottom: 0; left: 0; width: 100%; max-width: 320px; background-color: #333; box-sizing: border-box; padding: .5em 1em; -webkit-transform: translateX(-100%); transform: translateX(-100%); -webkit-transition: -webkit-transform .5s; transition: -webkit-transform .5s; transition: transform .5s; transition: transform .5s, -webkit-transform .5s;
}
nav .MenuHandle { position: absolute; right: 0; -webkit-transform: translateX(3em); transform: translateX(3em); -webkit-transition: color .5s, -webkit-transform .5s; transition: color .5s, -webkit-transform .5s; transition: transform .5s, color .5s; transition: transform .5s, color .5s, -webkit-transform .5s;
}
.is-showingNavigation nav { -webkit-transform: translateX(0); transform: translateX(0);
}
.is-showingNavigation nav .MenuHandle { color: #fff; -webkit-transform: translateX(-1em); transform: translateX(-1em);
}
nav a { color: #f5f5f5; display: block; padding: 5px; text-decoration: none;
}
Menu handle - Script Codes JS Codes
$('.MenuHandle').on('click', function(){ $('body').toggleClass('is-showingNavigation'); $(this).toggleClass('is-active');
});
$('nav a').on('click', function(){ $('body').toggleClass('is-showingNavigation'); $('.MenuHandle').toggleClass('is-active');
});
Developer | Aurer |
Username | aurer |
Uploaded | November 30, 2022 |
Rating | 3 |
Size | 3,349 Kb |
Views | 16,192 |
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 |
Vue form theme | 3,755 Kb |
Laravel AutoSchema Mockup | 2,191 Kb |
Tomcat chrome extension UI | 2,979 Kb |
CSS cube experiment | 3,172 Kb |
A Pen by Aurer | 3,919 Kb |
Super Clock | 6,256 Kb |
Update manager experimental UI | 3,742 Kb |
A responsive table | 3,354 Kb |
Squished forms mockup | 3,389 Kb |
Learning canvas drawing | 2,204 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 |
Fluid Layout with Float | Jxqr97 | 1,785 Kb |
03 - CSS Variables | Run-time | 2,682 Kb |
Playing with FlexBox | _Billy_Brown | 3,162 Kb |
Glowing Pulse Form | Jackrugile | 2,542 Kb |
Tail rose iris lined | Kbrtrm | 1,846 Kb |
Vanilla modal window | Jasonhowmans | 3,554 Kb |
Toolbar | Onsen | 5,414 Kb |
Material design buttons | Fischaela | 4,381 Kb |
Atom | Bhlaird | 1,932 Kb |
Sticky div | Kaslab | 2,225 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!