Burger menu icon
How do I make an burger menu icon?
What is a burger menu icon? How do you make a burger menu icon? This script and codes were developed by Alan Shortis on 14 November 2022, Monday.
Burger menu icon - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Burger menu icon</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <a href="#" class="menu-button" id="js-menu-button"><span></span></a> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Burger menu icon - Script Codes CSS Codes
html, body { height: 100%;
}
body { display: flex; justify-content: center; align-items: center; background: #333;
}
.menu-button { position: relative; display: block; width: 25px; height: 25px;
}
.menu-button span { position: absolute; top: 50%; left: 0;
}
.menu-button span:before, .menu-button span:after { position: absolute; content: '';
}
.menu-button span:before { margin-top: -8px;
}
.menu-button span:after { margin-top: 8px;
}
.menu-button span, .menu-button span:before, .menu-button span:after { display: block; width: 25px; height: 2px; background: white; transition: all 200ms ease;
}
.menu-button--active span { background-color: transparent;
}
.menu-button--active span:before { margin-top: 0; background-color: white; transform: rotate(-45deg);
}
.menu-button--active span:after { margin-top: 0; background-color: white; transform: rotate(45deg);
}
Burger menu icon - Script Codes JS Codes
$('#js-menu-button').on('click', function(e) { e.preventDefault(); $(this).toggleClass('menu-button--active'); $('body').toggleClass('menu-open');
});
Developer | Alan Shortis |
Username | alanshortis |
Uploaded | November 14, 2022 |
Rating | 3 |
Size | 2,374 Kb |
Views | 40,480 |
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 |
Count up | 2,391 Kb |
Subtle animated gradient background | 1,475 Kb |
Shaft of Light | 0 Kb |
Something | 2,094 Kb |
Overlapping Circles | 0 Kb |
Responsive Grid | 2,064 Kb |
Orb | 0 Kb |
Flexbox responsive embed | 2,086 Kb |
Cycled placeholders | 2,454 Kb |
Spotify Artist Radio Thumbnails | 3,287 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 |
Wikipedia Viewer | Odylic | 2,333 Kb |
RAQuote | Naderk007 | 4,412 Kb |
Horizontal scroll fixed element | HerrSerker | 0 Kb |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Brown by pure CSS, no image, no javascript | Aaronchuo | 2,652 Kb |
TweetBox with React JS | J0zelito | 3,325 Kb |
Zip Button test | Lje7462 | 1,932 Kb |
SVG Animation | Pollardld | 3,133 Kb |
Swiftype Lower Third | Zumwalt | 4,796 Kb |
P5.js data visualization | Enginarslan | 2,233 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!