Hamburger Menu Animation

Developer
Size
2,580 Kb
Views
26,312

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 Previews

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'); });
Hamburger Menu Animation - Script Codes
Hamburger Menu Animation - Script Codes
Home Page Home
Developer Salman Raza
Username salmanraza
Uploaded November 02, 2022
Rating 3
Size 2,580 Kb
Views 26,312
Do you need developer help for Hamburger Menu Animation?

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!

Salman Raza (salmanraza) Script Codes
Create amazing blog posts 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!