Navigation layout

Developer
Size
3,069 Kb
Views
20,240

How do I make an navigation layout?

What is a navigation layout? How do you make a navigation layout? This script and codes were developed by Samuel Janes on 14 September 2022, Wednesday.

Navigation layout Previews

Navigation layout - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Navigation layout</title> <link href="https://fonts.googleapis.com/css?family=Rubik:400,400i,700,700i" rel="stylesheet"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="nav">	<p>Logo</p>	<div class="hamburger">	<span></span>	<span></span>	<span></span>	</div>	<div class="links">	<ul>	<li><a href="#">Link 1</a></li>	<li><a href="#">Link 2</a></li>	<li><a href="#">Link 3</a></li>	<li><a href="#">Link 4</a></li>	</ul>	</div>
</div> <script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Navigation layout - Script Codes CSS Codes

* { box-sizing: border-box;
}
body { font-family: "Rubik", sans-serif;
}
.nav { width: 100%; height: 70px; position: fixed; top: 0; left: 0; box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.35); display: flex; justify-content: space-between; align-items: center; padding: 0 20px;
}
.nav .hamburger { width: 50px; height: 35px; position: relative;
}
.nav .hamburger.open span:nth-child(1) { top: 50%; transform: translate(0, -50%) rotate(45deg);
}
.nav .hamburger.open span:nth-child(2) { opacity: 0;
}
.nav .hamburger.open span:nth-child(3) { top: 50%; transform: translate(0, -50%) rotate(-45deg);
}
.nav .hamburger span { position: absolute; left: 0; width: 100%; height: 5px; background: black; transition: 0.15s ease-in-out;
}
.nav .hamburger span:nth-child(1) { top: 0;
}
.nav .hamburger span:nth-child(2) { top: 15px;
}
.nav .hamburger span:nth-child(3) { top: 30px;
}
.nav .links { position: absolute; right: 20px; top: 95px; padding: 20px 40px; box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.35); widtH: 97.5%; max-width: 480px; display: none;
}
@media (max-width: 640px) { .nav .links { right: auto; top: 80px; left: 50%; transform: translate(-50%, 0); width: 97.5%; max-width: 97.5%; }
}
.nav .links ul { position: relative; list-style: none; padding: 0; transition: 0.15s ease-in-out;
}
@media (max-widtH: 640px) { .nav .links ul { text-align: center; }
}
.nav .links ul li { font-size: 20px; padding: 10px 0; transition: 0.15s ease-in-out;
}
.nav .links ul li a { color: black; text-decoration: none; transition: 0.15s ease-in-out;
}

Navigation layout - Script Codes JS Codes

$(document).ready( function(){	$(".hamburger").addClass("open");	$(".links").slideDown(150);	$("body").css("pointer-events", "none");	setTimeout( function(){	$(".hamburger").removeClass("open");	$(".links").slideUp(150);	$("body").css("pointer-events", "inherit");	}, 1500);
});
$(".hamburger").on('click', function(e){	$(this).toggleClass("open");	$(".links").slideToggle(150);
});
Navigation layout - Script Codes
Navigation layout - Script Codes
Home Page Home
Developer Samuel Janes
Username SamuelJanes
Uploaded September 14, 2022
Rating 3
Size 3,069 Kb
Views 20,240
Do you need developer help for Navigation layout?

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!

Samuel Janes (SamuelJanes) Script Codes
Create amazing SEO content 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!