Responsive Menu I

Size
3,045 Kb
Views
24,288

How do I make an responsive menu i?

What is a responsive menu i? How do you make a responsive menu i? This script and codes were developed by Roderick Sandoval on 16 October 2022, Sunday.

Responsive Menu I Previews

Responsive Menu I - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Menu I</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="navigation"> <nav class="block-menu"> <h2>Responsive Menu I</h2> <ul class="menu"> <li class="first"><a href="/">Menu Item 1</a></li> <li><a href="#">Menu Item 2</a></li> <li><a href="#">Menu Item 3</a></li> <li class="expanded"><a href="#">Menu Item 4</a> <ul class="menu"> <li class="first"><a href="#">Sub-Item</a></li> <li><a href="#">Sub-Item</a></li> <li class="last"><a href="#">Sub-Item</a></li> </ul> </li> <li class="expanded"><a href="#">Menu Item 5</a> <ul class="menu"> <li class="first"><a href="#">Sub-Item</a></li> <li><a href="#">Sub-Item</a></li> <li class="last"><a href="#">Sub-Item</a></li> </ul> </li> <li class="last"><a href="#">Menu Item 6</a></li> </ul> </nav>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Responsive Menu I - Script Codes CSS Codes

.navigation ul { margin: 0; padding: 0; list-style: none; list-style-image: none;
}
.navigation ul li { display: inline-block; vertical-align: middle; zoom: 1; *display: inline;
}
body { margin: 0; font-family: avenir, 'avenir next', helvetica, arial, sans-serif;
}
a { text-decoration: none;
}
.navigation { position: relative; height: 60px; background: #7FDBFF; line-height: 60px;
}
.navigation h2 { display: none;
}
.navigation ul { text-align: center;
}
.navigation ul li a { display: block; padding: 0 10px; color: #000; line-height: 40px;
}
.navigation ul li a:hover { background: #FFDC00;
}
.navigation ul li:hover ul { visibility: visible;
}
.navigation ul ul { position: absolute; visibility: hidden; background: #7FDBFF; text-align: left;
}
.navigation ul ul li { display: block;
}
@media (max-width: 768px) { .navigation h2 { position: relative; display: block; margin: 0; padding: 0 20px; font-weight: 600; cursor: pointer; } .navigation h2:after { position: absolute; top: 0; right: 20px; content: "\2630"; } .navigation a { padding: 0 20px; } .navigation ul { display: none; width: 100%; } .navigation ul li { display: block; border-bottom: solid 1px #000; background: #7FDBFF; text-align: left; } .navigation ul li.last { border-bottom: none; } .navigation ul ul { z-index: 1; } .navigation ul ul li { width: 100%; } .navigation ul ul li a { background: #001F3F; color: #fff; } .navigation ul ul li a:hover { background: #0074D9; }
}

Responsive Menu I - Script Codes JS Codes

$(function() { $('.navigation h2') .click(function() { $('.navigation ul').slideToggle(); });
});
Responsive Menu I - Script Codes
Responsive Menu I - Script Codes
Home Page Home
Developer Roderick Sandoval
Username rodericksandoval
Uploaded October 16, 2022
Rating 3
Size 3,045 Kb
Views 24,288
Do you need developer help for Responsive Menu I?

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!

Roderick Sandoval (rodericksandoval) Script Codes
Create amazing captions with AI!

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!