Menu handle

Developer
Size
3,349 Kb
Views
16,192

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 Previews

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');
});
Menu handle - Script Codes
Menu handle - Script Codes
Home Page Home
Developer Aurer
Username aurer
Uploaded November 30, 2022
Rating 3
Size 3,349 Kb
Views 16,192
Do you need developer help for Menu handle?

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!

Aurer (aurer) Script Codes
Create amazing marketing copy with AI!

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!