Hamburger Menu Animation
How do I make an hamburger menu animation?
What is a hamburger menu animation? How do you make a hamburger menu animation? This script and codes were developed by Salman Raza on 02 November 2022, Wednesday.
Hamburger Menu Animation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hamburger Menu Animation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <main> <div class="hmbrgr_menu_cnt"> <span class="arrow"></span> </div> <div class="hmbrgr_menu_cnt close"> <span class="arrow"></span> </div> </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>
Hamburger Menu Animation - Script Codes CSS Codes
@import url('https://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900'); @import url('https://fonts.googleapis.com/css?family=Playball'); body { background-image: linear-gradient(45deg, #fad0c4 0%, #fad0c4 1%, #ffd1ff 100%); } * { box-sizing: border-box; } main { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; } main:after { content: 'Salman Raza'; font-family: 'Playball', cursive; position: absolute; bottom: -90px; left: 50%; color: rgba(0, 0, 0, 0.017); font-size: 150px; line-height: 140px; white-space: nowrap; text-transform: lowercase; transform: translateX(-50%); pointer-events: none; z-index: -1; } .hmbrgr_menu_cnt { width: 60px; height: 50px; position: relative; padding: 5px; cursor: pointer; transition: all 0.5s ease; float: left; margin:0 60px } .hmbrgr_menu_cnt:before, .hmbrgr_menu_cnt:after, .hmbrgr_menu_cnt .arrow { position: absolute; content: ''; width: 85%; height: 2px; background-color: #000; -webkit-transition: all 0.5s ease; -moz-transition: all 0.5s ease; -ms-transition: all 0.5s ease; -o-transition: all 0.5s ease; transition: all 0.5s ease; } .hmbrgr_menu_cnt .arrow {top: 50%; transform: translateY(-50%);} /* [ Back Button ] */ .hmbrgr_menu_cnt:before { top: 12px; } .hmbrgr_menu_cnt:after { bottom: 12px; } .hmbrgr_menu_cnt.open { transform: rotate(360deg); } .hmbrgr_menu_cnt.open:before {transform: rotate(-45deg); top: 17px;} .hmbrgr_menu_cnt.open:after {transform: rotate(45deg); bottom: 17px;} .hmbrgr_menu_cnt.open:before, .hmbrgr_menu_cnt.open:after { left: 2px; width: 35%;} .hmbrgr_menu_cnt.open:before, .hmbrgr_menu_cnt.open:after, .hmbrgr_menu_cnt.open .arrow { height: 4px; } .hmbrgr_menu_cnt .arrow:before, .hmbrgr_menu_cnt .arrow:after { position: absolute; top: -50px; left: 50%; transform: translateX(-50%); font-family: 'Lato', sans-serif; white-space: nowrap; text-transform: uppercase; font-size: 12px; letter-spacing: 2px; } .hmbrgr_menu_cnt .arrow:before {content: 'Hamburger Menu';} .hmbrgr_menu_cnt .arrow:after { content: 'back arrow'; display: none;} .hmbrgr_menu_cnt.open .arrow:before {display: none;} .hmbrgr_menu_cnt.open .arrow:after {display: block;} /* [ // Back Button ] */ /* [ Close Button ] */ .hmbrgr_menu_cnt.close.open:before {top: 22.5px;} .hmbrgr_menu_cnt.close.open:after {bottom: 22.5px;} .hmbrgr_menu_cnt.close.open:before, .hmbrgr_menu_cnt.close.open:after { left: 0; width: 100%;} .hmbrgr_menu_cnt.close.open .arrow { transform: translateY(-50%) rotate(45deg);background-color: transparent; } .hmbrgr_menu_cnt.close.open .arrow:before {content: 'Hamburger Menu';} .hmbrgr_menu_cnt.close.open .arrow:after { content: 'Close Menu'; display: none;} .hmbrgr_menu_cnt.close.open .arrow:before {display: none;} .hmbrgr_menu_cnt.close.open .arrow:after {display: block; transform: rotate(-45deg); bottom: -160px; right: -20px; } /* [ //Close Button ] */
Hamburger Menu Animation - Script Codes JS Codes
$('.hmbrgr_menu_cnt').click (function(){ $(this).toggleClass('open'); });
Developer | Salman Raza |
Username | salmanraza |
Uploaded | November 02, 2022 |
Rating | 3 |
Size | 2,580 Kb |
Views | 26,312 |
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 |
Event short details Card view | 4,004 Kb |
App design | 8,269 Kb |
Event Card | 2,517 Kb |
Testimonial carousel | 3,457 Kb |
Pure CSS search bar | 2,583 Kb |
Circle-background-animation | 1,853 Kb |
Radio Button Animation Pure CSS | 2,538 Kb |
Product showcase | 3,787 Kb |
Progress with CSS variables | 2,863 Kb |
Event card View | 3,817 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 |
Ionic - Wordpress REST API starter | Superpikar | 2,961 Kb |
Scroll effect with text with help from Skrollr | Luxonglassing | 2,935 Kb |
Table Exercise | Fresco | 9,585 Kb |
Bloomberg Style Link Hover | Gil-- | 1,609 Kb |
SVG Hover Animations | Kjbrum | 10,557 Kb |
Mostly Fluid | Mccreath | 3,308 Kb |
Pricing Table | Semenchenko | 6,784 Kb |
Social buttons | Flacu | 2,022 Kb |
Twitch TV | Natester13 | 4,488 Kb |
Simple Responsive Text | Fbrz | 2,282 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!