Pure CSS Flexbox Navigation
How do I make an pure css flexbox navigation?
A pure CSS approach to a nav menu using Flexbox.. What is a pure css flexbox navigation? How do you make a pure css flexbox navigation? This script and codes were developed by Andy Hoffman on 24 August 2022, Wednesday.
Pure CSS Flexbox Navigation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Flexbox Navigation</title> <link href='https://fonts.googleapis.com/css?family=Arimo' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <label for="css-toggle-menu">MENU</label>
<input type="checkbox" id="css-toggle-menu" name="css-toggle-menu">
<nav aria-label="header-links"> <ul> <li><a href="#">purpose</a> <li><a href="#">general wrinkles</a> <li><a href="#">dryer sheets</a> <li><a href="#">cold-calling</a> <li><a href="#">sinbad</a> </ul>
</nav>
</body>
</html>
Pure CSS Flexbox Navigation - Script Codes CSS Codes
html, body, ul { margin: 0; padding: 0;
}
* { box-sizing: border-box; font-family: Arimo;
}
ul { width: 100%; border-radius: 3px; background: rgba(253, 153, 0, 0.5); padding: 1em; -webkit-transform: translateX(0); transform: translateX(0); -ms-flex-pack: distribute; justify-content: space-around; display: -webkit-box; display: -ms-flexbox; display: flex;
}
@media screen and (max-width: 700px) { ul { padding-top: 3em; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; position: absolute; }
}
li { list-style: none; display: inline-block; padding: 1em; overflow: hidden;
}
li a { display: block; text-decoration: none; color: #333; font-size: 0.8em; text-transform: uppercase; padding: 1em; white-space: nowrap; background-image: -webkit-linear-gradient(right, green 50%, yellow 50%); background-image: linear-gradient(to left, green 50%, yellow 50%); background-position: 0; background-size: 200%; -webkit-transition: all 0.4s; transition: all 0.4s;
}
li a:hover, li a:focus { background-position: -100%; color: white;
}
[type=checkbox] { display: none; width: 36px; height: 36px; background: #555; color: #fff; text-align: center; line-height: 36px; font-size: 1.6rem; border-radius: 4px;
}
[type=checkbox]:checked ~ nav ul { -webkit-transform: translateX(-100%); transform: translateX(-100%);
}
@media screen and (min-width: 701px) { [type=checkbox]:checked ~ nav ul { -webkit-transform: translateX(0); transform: translateX(0); }
}
label { position: absolute; right: 1em; top: 1em; background: black; color: white; border: none; padding: 1em; visibility: hidden; font-size: 80%; cursor: pointer;
}
@media screen and (max-width: 700px) { label { visibility: visible; z-index: 1; }
}
Developer | Andy Hoffman |
Username | antibland |
Uploaded | August 24, 2022 |
Rating | 3 |
Size | 3,012 Kb |
Views | 30,360 |
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 |
Plain Text Contenteditable | 2,538 Kb |
Animate fill color via currentColor | 1,810 Kb |
Skewed Frame | 1,874 Kb |
Animated Stacked Pages | 9,137 Kb |
Flexbox Wrapping | 1,720 Kb |
Trusted Clicks | 3,314 Kb |
Working with jQuery Marquee plugin | 2,126 Kb |
Full page image fade in | 1,849 Kb |
Active Nav Item On Top | 1,661 Kb |
A Pen by Andy Hoffman | 2,037 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 |
Blockquote design | Sjmcpherson | 1,863 Kb |
A Pen by Dalton Liu | Liudalton | 12,437 Kb |
Flat buttons for Eliassen.com | Kdooley89 | 1,737 Kb |
Canvas Orbital Trails v2 | Jackrugile | 3,421 Kb |
A Pen by aleen42 | Aleen42 | 11,473 Kb |
Css3 loader | Clknap | 2,391 Kb |
A Pen by Jason Kinney | Jason-kinney | 1,980 Kb |
CSS background-size - GSAP | Jonathan | 2,209 Kb |
Pink expansion tunnel | Vez | 1,738 Kb |
Table Exercise | Fresco | 9,585 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!