Scroll Overflow Menu
How do I make an scroll overflow menu?
This is a demo for an article . What is a scroll overflow menu? How do you make a scroll overflow menu? This script and codes were developed by Hugo DarbyBrown on 09 August 2022, Tuesday.
Scroll Overflow Menu - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Scroll Overflow Menu</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css'>
<link rel='stylesheet prefetch' href='http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css'>
<link rel='stylesheet prefetch' href='css/f179d14c2abbc7184a84c52bf.css'> <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! */ @import "http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css";
body { margin: 0;
}
header { background-color: #4096ee;
}
/* Micro clearfix */
header:before,
header:after { content: " "; display: table;
}
header:after { clear: both;
}
nav { transition: .6s ease-in-out; background: radial-gradient(black 15%, transparent 16%) 0 0, radial-gradient(black 15%, transparent 16%) 8px 8px, radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px, radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px; background-color:#282828; background-size:16px 16px; overflow-x: scroll; max-height: 0; -webkit-overflow-scrolling: touch;
}
@media (min-width: 31.25em) { nav { max-height: none; background: none; box-shadow: none; overflow: hidden; }
}
.show { box-shadow: inset -2px 0 3px rgba(black,0.6); max-height: 15em;
}
ul { list-style: none; margin: 0; padding: 0; padding-top: 1em; text-align: justify; width: 30em;
}
ul:after { content: ''; display: inline-block; width: 100%;
}
@media (min-width: 31.25em) { ul { background-color: #4096ee; width: 100%; }
}
li { background-color: #161616; border-radius: 6px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.3); display: inline-block; font-family: arial; font-size: 1.2rem; padding: 0.6em; text-align: center; width: 3.5em;
}
@media (min-width: 31.25em) { li { background: none; box-shadow: none; font-size: 1.5rem; padding: 0; width: auto; }
}
li:first-child { margin-left: 0.5em;
}
li:last-child { margin-right: 0.5em;
}
li a { color: #ccc; display: block; text-align: center; text-decoration: none;
}
@media (min-width: 31.25em) { li a { color: #fff; }
}
li a:before { display: block; font-family: FontAwesome; font-weight: normal; font-size: 2rem; font-style: normal; text-decoration: inherit; vertical-align: top; -webkit-font-smoothing: antialiased;
}
@media (min-width: 48.875em) { li a:before { display: inline-block; margin-right: 0.3em; }
}
/* Used nth-childs to allocate icons to keep the HTML markup clean */
li:first-child a:before { content: '\f015';
}
li:nth-child(2) a:before { content: '\f05a';
}
li:nth-child(3) a:before { content: '\f0b1';
}
li:nth-child(4) a:before { content: '\f0e0';
}
/* The Menu Nav Button */
.icon-th { color: #fff; float: right; font-size: 2rem; margin: 0.3em 0.4em;
}
@media (min-width: 31.25em) { .icon-th { display: none; }
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <header> <nav role='navigation'> <ul> <li><a href="#">Home</a></li> <li><a href="#">About</a></li> <li><a href="#">Clients</a></li> <li><a href="#">Contact</a></li> </ul> </nav> <a href="#" class="icon-th"></a>
</header> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Scroll Overflow Menu - Script Codes CSS Codes
@import "http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css";
body { margin: 0;
}
header { background-color: #4096ee;
}
/* Micro clearfix */
header:before,
header:after { content: " "; display: table;
}
header:after { clear: both;
}
nav { transition: .6s ease-in-out; background: radial-gradient(black 15%, transparent 16%) 0 0, radial-gradient(black 15%, transparent 16%) 8px 8px, radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 0 1px, radial-gradient(rgba(255,255,255,.1) 15%, transparent 20%) 8px 9px; background-color:#282828; background-size:16px 16px; overflow-x: scroll; max-height: 0; -webkit-overflow-scrolling: touch;
}
@media (min-width: 31.25em) { nav { max-height: none; background: none; box-shadow: none; overflow: hidden; }
}
.show { box-shadow: inset -2px 0 3px rgba(black,0.6); max-height: 15em;
}
ul { list-style: none; margin: 0; padding: 0; padding-top: 1em; text-align: justify; width: 30em;
}
ul:after { content: ''; display: inline-block; width: 100%;
}
@media (min-width: 31.25em) { ul { background-color: #4096ee; width: 100%; }
}
li { background-color: #161616; border-radius: 6px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.3), inset 0 -1px 1px rgba(0, 0, 0, 0.3); display: inline-block; font-family: arial; font-size: 1.2rem; padding: 0.6em; text-align: center; width: 3.5em;
}
@media (min-width: 31.25em) { li { background: none; box-shadow: none; font-size: 1.5rem; padding: 0; width: auto; }
}
li:first-child { margin-left: 0.5em;
}
li:last-child { margin-right: 0.5em;
}
li a { color: #ccc; display: block; text-align: center; text-decoration: none;
}
@media (min-width: 31.25em) { li a { color: #fff; }
}
li a:before { display: block; font-family: FontAwesome; font-weight: normal; font-size: 2rem; font-style: normal; text-decoration: inherit; vertical-align: top; -webkit-font-smoothing: antialiased;
}
@media (min-width: 48.875em) { li a:before { display: inline-block; margin-right: 0.3em; }
}
/* Used nth-childs to allocate icons to keep the HTML markup clean */
li:first-child a:before { content: '\f015';
}
li:nth-child(2) a:before { content: '\f05a';
}
li:nth-child(3) a:before { content: '\f0b1';
}
li:nth-child(4) a:before { content: '\f0e0';
}
/* The Menu Nav Button */
.icon-th { color: #fff; float: right; font-size: 2rem; margin: 0.3em 0.4em;
}
@media (min-width: 31.25em) { .icon-th { display: none; }
}
Scroll Overflow Menu - Script Codes JS Codes
$("header > a").click(function () { $("nav").toggleClass("show");
});
/* Vanilla JS
document.querySelector('header > a').onclick = function () { var nav = document.querySelector('nav'); nav.classList.toggle('show');
}
*/
Developer | Hugo DarbyBrown |
Username | hugo |
Uploaded | August 09, 2022 |
Rating | 3.5 |
Size | 5,614 Kb |
Views | 48,576 |
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 |
Iron Man Login Form | 7,117 Kb |
Animated Atom Logo | 5,901 Kb |
SCSS version of Meta Fizzy | 13,492 Kb |
Roll Over Social Buttons | 2,811 Kb |
Rainbow 3D Text | 4,538 Kb |
Animated Submit Button | 5,860 Kb |
LunchBreak Sassing | 2,885 Kb |
Concept mobile navigation | 4,141 Kb |
Social-Media Card | 6,177 Kb |
80s Retro spinning cube | 3,011 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 |
Mosaic transition effect between two photos using jQuery | Stathisg | 2,518 Kb |
Responsive scrolling text | Ashdurham | 2,259 Kb |
Custom Select Element | Agrayson | 3,616 Kb |
Perforated foil | 0x04 | 2,617 Kb |
Degree Picker | Idered | 4,307 Kb |
Filtre ile Arama Kutusu - Search Box with Filter | AyhanALTINOK | 3,448 Kb |
Kut D3 | Jellevrswk | 3,687 Kb |
Toggle menu | Seyedi | 2,279 Kb |
Cloudy Spiral CSS animation | Hakimel | 6,587 Kb |
Coburg Banks SVG Logo | Mjtweaver | 3,875 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!