Hamburglar
How do I make an hamburglar?
Hamburger menu icon animation. Working on making it as modular and portable as possible.TODO: add if statement for menu text, check weird text jump on active, round pixels. What is a hamburglar? How do you make a hamburglar? This script and codes were developed by Travis Arnold on 12 September 2022, Monday.
Hamburglar - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Hamburglar</title> <style> /* NOTE: The styles were added inline because Prefixfree needs access to your styles and they must be inlined if they are on local disk! */ .menu-icon { display: inline-block; position: relative; padding: 28.8px 21.6px 28.8px 115.2px; text-indent: -93.6px; font-size: 28.8px; line-height: 6px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 3px; cursor: pointer; user-select: none;
}
.menu-icon i { position: relative; display: block; width: 36px; height: 6px; background: #fff; border-radius: 5em; font-style: normal; transition: background 0.1s;
}
.menu-icon i:after, .menu-icon i:before { content: ''; display: block; position: absolute; z-index: -1; height: 6px; width: 36px; background: #fff; border-radius: inherit; transition: top 0.1s 0.2s ease, transform 0.1s ease;
}
.menu-icon i:before { top: -12px;
}
.menu-icon i:after { top: 12px;
}
.is-active i { background: transparent;
}
.is-active i:before, .is-active i:after { top: 0; transition: top 0.1s ease, transform 0.1s 0.2s ease; transform: rotate(45deg) translate(0);
}
.is-active i:after { transform: rotate(-45deg);
}
body { font-family: Helvetica, sans-serif; background: #54C7F3;
}
.menu-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <a class="menu-icon"> <i>Menu</i>
</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>
Hamburglar - Script Codes CSS Codes
.menu-icon { display: inline-block; position: relative; padding: 28.8px 21.6px 28.8px 115.2px; text-indent: -93.6px; font-size: 28.8px; line-height: 6px; color: #fff; border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 3px; cursor: pointer; user-select: none;
}
.menu-icon i { position: relative; display: block; width: 36px; height: 6px; background: #fff; border-radius: 5em; font-style: normal; transition: background 0.1s;
}
.menu-icon i:after, .menu-icon i:before { content: ''; display: block; position: absolute; z-index: -1; height: 6px; width: 36px; background: #fff; border-radius: inherit; transition: top 0.1s 0.2s ease, transform 0.1s ease;
}
.menu-icon i:before { top: -12px;
}
.menu-icon i:after { top: 12px;
}
.is-active i { background: transparent;
}
.is-active i:before, .is-active i:after { top: 0; transition: top 0.1s ease, transform 0.1s 0.2s ease; transform: rotate(45deg) translate(0);
}
.is-active i:after { transform: rotate(-45deg);
}
body { font-family: Helvetica, sans-serif; background: #54C7F3;
}
.menu-icon { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
}
Hamburglar - Script Codes JS Codes
$('.menu-icon').on('click', function(){ $(this).toggleClass('is-active');
});
Developer | Travis Arnold |
Username | souporserious |
Uploaded | September 12, 2022 |
Rating | 3.5 |
Size | 3,457 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 |
React Circle Media Player | 5,566 Kb |
Instagram Style HTML5 Video Player | 3,902 Kb |
Success Message | 3,351 Kb |
React Measure Demo | 3,718 Kb |
React Media Player Demo | 3,798 Kb |
Material CSS Switch | 2,979 Kb |
React Checkbox MultiSelect | 6,915 Kb |
Wipe Hover Effect | 2,975 Kb |
Expose - a responsive jQuery modal plugin | 3,754 Kb |
Playing with CSS folding | 3,155 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 |
Expert Help | SinceSidSlid | 4,064 Kb |
Animating characters with jQuery | 042 | 2,776 Kb |
Sticky div | Kaslab | 2,225 Kb |
Angular Sandbox | Alexgurrola | 1,616 Kb |
SVG Transform vs CSS Transform | AmeliaBR | 4,175 Kb |
Wrap_Test | Mscfourn | 7,503 Kb |
A Pen by Anoop | Anoopjohn | 330,760 Kb |
Ghost Buttons with CSS3 | Mithicher | 2,509 Kb |
CSS Gem Badge | Orchard | 3,335 Kb |
Portfolio Layout Flex | Lahvjal | 3,489 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!