Menu
How do I make an menu?
Cool Menu with arrow.. What is a menu? How do you make a menu? This script and codes were developed by Ty Strong on 11 August 2022, Thursday.
Menu - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Menu</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! */ body { background: #fff url(http://ugogreener.com/images/bg_stripes.gif); color: #eee; font-size: 16px; font-family: greatFont, Arial, Helvetica, serif; margin: 0; border: 0; padding: 0;
}
#menu-container, #closed-container { position: fixed; top: 0; left: 0; width: 100%; height: 50px; background: transparent; transition-property: top; transition-duration: 500ms; z-index: 3;
}
#closed-container { top: -50px;
}
.menu, .closed-menu { display: block; margin: 0 auto; padding: 0; width: 450px; height: 40px; background: #A0D468; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; font-weight: 100; color: #fff;
}
.closed-menu { width: 100px;
}
.menu span { transition-property: text-shadow; transition-duration: 200ms; text-shadow: 0 0 1px #333;
}
.arrow, .closed-arrow { position: relative; top: 2px; background: transparent; transition-property: border-width, top; transition-duration: 300ms, 300ms; margin: 0 auto; width: 20px; height: 20px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.closed-arrow { top: 14px; border-width: 2px 0 0 2px;
}
.closed-arrow-container:hover .closed-arrow { top: 2px; border-width: 0 2px 2px 0;
}
.arrow-container:hover .arrow { top: 14px; border-width: 2px 0 0 2px;
}
.closed-arrow-container, .arrow-container { width: 50px; height: 40px; background: transparent; margin: auto;
}
.menu-item { float: left; position: relative; top: 9px; cursor: pointer;
}
.menu span:hover { text-shadow: 0 0 5px #333; text-decoration: underline;
}
#item1 { left: 16px;
}
#item2 { left: 50px;
}
#item3 { left: 136px;
}
#item4 { left: 156px;
}
@font-face { font-family: greatFont; font-weight: 100; src: url(http://ugogreener.com/fonts/Pluto-Light.otf) format("opentype");
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <div id="menu-container"> <div id="pickme" class="menu"> <span id="item1" class="menu-item">Home</span> <span id="item2" class="menu-item">About Us</span> <span id="item3" class="menu-item">Solutions</span> <span id="item4" class="menu-item">Contact</span> <div class="arrow-container" onClick="hideMenu()"> <div class="arrow"> </div> </div> </div>
</div>
<div id="closed-container"> <div class="closed-menu"> <div class="closed-arrow-container" onClick="hideClosed()"> <div class="closed-arrow"></div> </div> </div>
</div> <script src="js/index.js"></script>
</body>
</html>
Menu - Script Codes CSS Codes
body { background: #fff url(http://ugogreener.com/images/bg_stripes.gif); color: #eee; font-size: 16px; font-family: greatFont, Arial, Helvetica, serif; margin: 0; border: 0; padding: 0;
}
#menu-container, #closed-container { position: fixed; top: 0; left: 0; width: 100%; height: 50px; background: transparent; transition-property: top; transition-duration: 500ms; z-index: 3;
}
#closed-container { top: -50px;
}
.menu, .closed-menu { display: block; margin: 0 auto; padding: 0; width: 450px; height: 40px; background: #A0D468; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; font-weight: 100; color: #fff;
}
.closed-menu { width: 100px;
}
.menu span { transition-property: text-shadow; transition-duration: 200ms; text-shadow: 0 0 1px #333;
}
.arrow, .closed-arrow { position: relative; top: 2px; background: transparent; transition-property: border-width, top; transition-duration: 300ms, 300ms; margin: 0 auto; width: 20px; height: 20px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.closed-arrow { top: 14px; border-width: 2px 0 0 2px;
}
.closed-arrow-container:hover .closed-arrow { top: 2px; border-width: 0 2px 2px 0;
}
.arrow-container:hover .arrow { top: 14px; border-width: 2px 0 0 2px;
}
.closed-arrow-container, .arrow-container { width: 50px; height: 40px; background: transparent; margin: auto;
}
.menu-item { float: left; position: relative; top: 9px; cursor: pointer;
}
.menu span:hover { text-shadow: 0 0 5px #333; text-decoration: underline;
}
#item1 { left: 16px;
}
#item2 { left: 50px;
}
#item3 { left: 136px;
}
#item4 { left: 156px;
}
@font-face { font-family: greatFont; font-weight: 100; src: url(http://ugogreener.com/fonts/Pluto-Light.otf) format("opentype");
}
Menu - Script Codes JS Codes
function hideMenu(){
document.getElementById("menu-container").style.top="-50px";
window.setTimeout(showClosed(),0)
}
function showClosed(){
document.getElementById("closed-container").style.top="0px";
}
function hideClosed(){
document.getElementById("closed-container").style.top="-50px";
window.setTimeout(showMenu(),0)
}
function showMenu(){
document.getElementById("menu-container").style.top="0px";
}
Developer | Ty Strong |
Username | tystrong |
Uploaded | August 11, 2022 |
Rating | 3.5 |
Size | 3,154 Kb |
Views | 34,408 |
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 |
The Greatest. | 1,723 Kb |
Updated Personal Page | 3,682 Kb |
Rolling Circle | 1,942 Kb |
Info on Hover | 3,258 Kb |
Logo Cubes in Slim and SCSS | 2,661 Kb |
Another No Div Spinner | 1,938 Kb |
Colors and Media Queries | 2,952 Kb |
Heart Monitor | 3,048 Kb |
CSS Laptop | 2,987 Kb |
RADICAL | 2,222 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 |
Horizontal Navigation with Floats | Gymratpacks | 5,403 Kb |
LeMandinque | Aadesida | 9,046 Kb |
Background Images | Jooonebug | 2,100 Kb |
Heartbeat | Apetrov | 2,079 Kb |
A Pen by Brendan Skousen | Bskousen | 2,954 Kb |
Faces SVG animation | ScavengerFrontend | 2,957 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 Kb |
Dribbble Template | ExtremelyGinger | 2,204 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Experiment | Toddmoy | 2,849 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!