Expanding Nav Element
How do I make an expanding nav element?
A pure CSS implementation based on the morphing buttons codrops article demo - http://tympanus.net/Development/ButtonComponentMorph/index7.html#. What is a expanding nav element? How do you make a expanding nav element? This script and codes were developed by Scott on 09 December 2022, Friday.
Expanding Nav Element - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Expanding Nav Element</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <input type="checkbox" id="nav-expand" class="invis" /> <nav class="nav-side"> <label for="nav-expand" class="btn-label"> Click plz </label> <ul class="menu-list"> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> ಠ_ಠ Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> <li> <a href="#!" title="descriptive title"> Link Label </a> </li> </ul> </nav> <main class="main-base" role="main"> <header class="header-base" role="banner"> <div class="content"> <h1> Display Sidebar/Settings on Click/Press of Icon </h1> </div> </header> <article> <div class="content"> <p> Bacon ipsum dolor sit amet filet mignon prosciutto ham hock boudin pork chop swine shoulder beef. Flank andouille ground round strip steak pork bacon venison ham hock, tongue turducken. Venison jowl hamburger salami bacon capicola. Chuck ribeye sirloin spare ribs, venison beef t-bone prosciutto swine strip steak. Chuck jowl spare ribs tenderloin prosciutto. Pancetta pork chop venison bacon short ribs porchetta. Short loin short ribs kielbasa biltong t-bone tail brisket porchetta pork pork loin chicken. </p> <p> Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs. </p> <p> Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine. </p> <p> Pork belly meatball sirloin ribeye pork loin meatloaf. Tongue kielbasa chuck sausage, turducken jerky hamburger t-bone fatback frankfurter pork loin pig venison tail. Sirloin tri-tip kevin shankle salami doner jerky capicola leberkas tongue drumstick. Tongue turkey prosciutto salami tri-tip. Shank doner sirloin landjaeger pancetta beef ribs. </p> <p> Frankfurter pork loin short ribs andouille kevin. T-bone tail pig chuck prosciutto brisket. Landjaeger tail fatback beef porchetta, biltong shoulder turkey shankle kevin jowl pancetta brisket pork belly boudin. Short loin tenderloin swine, hamburger bresaola rump shank ground round ham kielbasa chicken pancetta capicola. Boudin chicken frankfurter, pig kielbasa flank ball tip. Corned beef pastrami landjaeger, meatloaf flank shankle pig meatball chuck pork loin swine. </p> </div> </article> <footer> <div class="content"> <p> Oh bai </p> </div> </footer> </main> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>
Expanding Nav Element - Script Codes CSS Codes
*, *::after, *::before { box-sizing: border-box; font-family: arial; line-height: 2; margin: 0;
}
body { background: #333; overflow-x: hidden;
}
@media screen and (max-width: 500px) { body { font-size: 80%; }
}
p { margin-bottom: 24px;
}
p:last-child { margin-bottom: 0;
}
.content { margin: auto; max-width: 1000px; padding: 20px;
}
.invis { height: 1px; left: -999px; position: absolute; top: -999px; visibility: hidden; width: 1px;
}
.main-base { background: #ddd; left: 0px; position: relative; transition: all .3s;
}
.main-base header, .main-base footer { background: #aaa; color: #fff;
}
footer a { color: #fff;
}
.nav-side { background: #E85657; color: #fff; bottom: 80px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); height: 80px; left: 40px; overflow: hidden; padding: 8px 0; position: fixed; transition: all .3s; width: 80px; z-index: 2;
}
.menu-list { height: 0%; list-style: none; margin: 0; overflow: hidden; padding: 0; transition: all .3s;
}
.menu-list a { border-bottom: 1px solid #eee; color: #fff; display: block; padding: 12px 8px; text-decoration: none;
}
.menu-list a:hover { background: rgba(0, 0, 0, 0.5);
}
.btn-label { cursor: pointer; text-align: center; display: block; height: calc(100% + 16px); margin-top: -8px;
}
.btn-label:hover { background: rgba(0, 0, 0, 0.2);
}
#nav-expand:checked + .nav-side { bottom: 0; height: 100%; left: 0; width: 200px;
}
#nav-expand:checked + .nav-side .menu-list { height: 100%;
}
#nav-expand:checked + .nav-side .btn-label { color: transparent; display: inline-block; height: 20px; overflow: hidden; line-height: 20px; text-align: center; width: 20px;
}
#nav-expand:checked + .nav-side .btn-label:hover { background: #eee;
}
#nav-expand:checked + .nav-side .btn-label::before { color: #000; content: "X"; line-height: 20px;
}
#nav-expand:checked + .nav-side + .main-base { left: 200px;
}
Developer | Scott |
Username | scottohara |
Uploaded | December 09, 2022 |
Rating | 4 |
Size | 3,854 Kb |
Views | 12,144 |
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 |
A Pen by Scott | 2,104 Kb |
Nav drop down menus | 3,996 Kb |
Morph Menu Button Updated | 3,283 Kb |
Accessible Modal Window | 5,165 Kb |
Tape Recorder | 3,016 Kb |
Super Mario World CSS Animations | 7,860 Kb |
Broken Heart | 2,583 Kb |
Show Desc. Block Hover | 2,553 Kb |
Buttons and buttons and buttons | 7,212 Kb |
Burger Time | 2,867 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 |
JS Beispiel getElementsByClassName 3 | HSZG-Frontend-Kurs | 1,988 Kb |
A Pen by Michael Parenteau | Michaelparenteau | 2,133 Kb |
A Pen by Alex Bergin | Abergin | 3,347 Kb |
Starting out with Ember.JS | Cfleschhut | 4,808 Kb |
Importable Clearfix | Corysimmons | 1,411 Kb |
Tile Animation Thing | Frxnz | 4,332 Kb |
IbrahimJabbari-Effect21 | Ibrahimjabbari | 1,882 Kb |
Slider | Mohammed-fawzy | 2,634 Kb |
NAV WPMANAGER | Mstoic | 1,991 Kb |
Glitchy Text Effect | Kescoe | 2,208 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!