MENU to Close Arrow
How do I make an menu to close arrow?
Could be used as an alternative to the hamburger to x fad going around for slide out side menus. The M is made up of horizontal rules. I like this concept, but it's not too lightweight unfortunately.. What is a menu to close arrow? How do you make a menu to close arrow? This script and codes were developed by Jack on 16 September 2022, Friday.
MENU to Close Arrow - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>MENU to Close Arrow</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="checkbox" id="toggle-menu">
<label for="toggle-menu" id="btn-menu"> <div class="M"> <hr> <hr> <hr> <hr> </div> <span>OME</span> <hr>
</label> <script src="js/index.js"></script>
</body>
</html>
MENU to Close Arrow - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Raleway:300);
body{ background-color:#EF4836; padding-top:80px;
}
#btn-menu{ font-size:70px; font-family: 'Raleway', sans-serif; cursor:pointer; width:240px; height:100px; display:block; margin:0 auto;
}
#btn-menu span{ -webkit-transition:all .5s ease; transition: all .5s ease; color:#C0392B;
}
#btn-menu:hover span{ color:#96281B;
}
#btn-menu:hover hr{ background-color:#96281B !important;
}
.M{ position:relative; width:30px; height:70px; top:-15px; left:8px; margin:0 auto; trasition:trasnlateZ(0); -webkit-transition:all .5s ease; transition: all .5s ease; display:inline-block;
}
#btn-menu > hr{ height:3px; border:none; background-color:#C0392B; border-radius:2px; position:relative; bottom:20px; width:240px; -webkit-transition:all .5s ease; transition: all .5s ease;
}
.M hr{ height:4px; border:none; background-color:#C0392B; border-radius:2px; width:50px; position:absolute; top:24px; -webkit-transition:all .5s ease; transition: all .5s ease;
}
.M hr:nth-child(2){ width:18px; top:25px; left:-0px; -webkit-transform:rotate(0deg); transform:rotate(0deg);
}
.M hr:nth-child(3){ width:18px; top:25px; right:0px; -webkit-transform:rotate(0deg); transform:rotate(0deg);
}
.M hr:first-child, .M hr:last-child{ -webkit-transform:rotate(90deg); transform:rotate(90deg);
}
.M hr:first-child{ left:-25px;
}
.M hr:last-child{ left:6px;
}
#toggle-menu{ display:none;
}
#toggle-menu:checked + #btn-menu > hr{ width:0px;
}
#toggle-menu:checked + #btn-menu .M{ -webkit-animation:rotateOpen .5s forwards; animation:rotateOpen .5s forwards; top:25px; left:30%;
}
#toggle-menu:checked + #btn-menu span{ opacity:0; margin-left:10px;
}
#toggle-menu:checked + #btn-menu .M hr:nth-child(2){ -webkit-animation:toArrow1 .5s forwards; animation:toArrow1 .5s forwards;
}
#toggle-menu:checked + #btn-menu .M hr:nth-child(3){ -webkit-animation:toArrow2 .4s forwards; animation:toArrow2 .4s forwards;
}
#toggle-menu:checked + #btn-menu .M hr:first-child{ -webkit-animation:toArrow3 .5s forwards; animation:toArrow3 .5s forwards;
}
#toggle-menu:checked + #btn-menu .M hr:last-child{ -webkit-animation:toArrow4 .5s forwards; animation:toArrow4 .5s forwards;
}
@-webkit-keyframes rotateOpen{ 0%{ -webkit-transform:rotate(0deg); transform:rotate(0deg); } 100%{ -webkit-transform:rotate(-90deg); transform:rotate(-90deg); }
}
@keyframes rotateOpen{ 0%{ -webkit-transform:rotate(0deg); transform:rotate(0deg); } 100%{ -webkit-transform:rotate(-90deg); transform:rotate(-90deg); }
}
@-webkit-keyframes toArrow1{ 0%{ -webkit-transform:rotate(60deg); transform:rotate(60deg); } 100%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); top:24px; width:50px; left:0px; }
}
@keyframes toArrow1{ 0%{ -webkit-transform:rotate(60deg); transform:rotate(60deg); } 100%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); top:24px; width:50px; left:0px; }
}
@-webkit-keyframes toArrow2{ 0%{ -webkit-transform:rotate(-60deg); transform:rotate(-60deg); } 95%{ opacity:1; } 100%{ -webkit-transform:rotate(-90deg); transform:rotate(-90deg); top:24px; width:50px; right:0px; opacity:0; }
}
@keyframes toArrow2{ 0%{ -webkit-transform:rotate(-60deg); transform:rotate(-60deg); } 95%{ opacity:1; } 100%{ -webkit-transform:rotate(-90deg); transform:rotate(-90deg); top:24px; width:50px; right:0px; opacity:0; }
}
@-webkit-keyframes toArrow3{ 0%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); left:-25px; } 100%{ -webkit-transform:rotate(120deg); transform:rotate(120deg); left:2px; width:32px; top:9px; }
}
@keyframes toArrow3{ 0%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); left:-25px; } 100%{ -webkit-transform:rotate(120deg); transform:rotate(120deg); left:2px; width:32px; top:9px; }
}
@-webkit-keyframes toArrow4{ 0%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); left:25px; } 100%{ -webkit-transform:rotate(60deg); transform:rotate(60deg); left:17px; width:32px; top:9px; }
}
@keyframes toArrow4{ 0%{ -webkit-transform:rotate(90deg); transform:rotate(90deg); left:25px; } 100%{ -webkit-transform:rotate(60deg); transform:rotate(60deg); left:17px; width:32px; top:9px; }
}
MENU to Close Arrow - Script Codes JS Codes
/*something different than all the hamburger to x animations*/
Developer | Jack |
Username | jackmoran |
Uploaded | September 16, 2022 |
Rating | 3 |
Size | 2,593 Kb |
Views | 32,384 |
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 |
Svg Icons of my personal logo-moranideas | 5,343 Kb |
CSS Google Now | 3,196 Kb |
Unify Test Example of Panorama | 2,117 Kb |
Stars Rise | 8,461 Kb |
Design-Thru | 15,383 Kb |
Rework of the rework with additional events | 9,314 Kb |
Flex-panels content | 2,787 Kb |
Fullscreen slides with TweenLite, CSSPlugin and ScrollToPlugin | 5,783 Kb |
Social Bar | 2,200 Kb |
A Pen by jack | 4,612 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 |
Transitioning application screens with semantically named classes | Djgrant | 3,697 Kb |
Pure CSS Tooltip | APinix | 2,815 Kb |
Text Blocks Over Image, Updated | KatieK2 | 3,122 Kb |
Mario | Takaneichinose | 3,902 Kb |
Flower expansion | Sreucherand | 3,425 Kb |
Gradients | Karpovsystems | 2,394 Kb |
Canvas snow | Win7killer | 2,572 Kb |
Fellowship of the Ring | Aussieyang | 2,639 Kb |
Owl Carousel - jumpTo | OwlFonk | 2,553 Kb |
A Pen by Eka Risyana | Risyana | 3,705 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!