Pure CSS Navigation

Developer
Size
3,649 Kb
Views
46,552

How do I make an pure css navigation?

What is a pure css navigation? How do you make a pure css navigation? This script and codes were developed by Michaela on 27 July 2022, Wednesday.

Pure CSS Navigation Previews

Pure CSS Navigation - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Pure CSS Navigation</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.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! */ /* Fonts */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600,700);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
body { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 400;
}
[class*="fontawesome-"]:before { font-family: 'FontAwesome', sans-serif;
}
/* Styles */
input[type=checkbox] + label { -moz-transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; -o-transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; -webkit-transition: background-color 1s ease-in, color 0.75s ease-in; -webkit-transition-delay: 0.25s, 0.1s; transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; font-size: 2rem; font-weight: 700; background-color: white; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; cursor: pointer; padding: 0.3em 0.4em 0.3em 0.4em; position: fixed; top: 0; left: 0;
}
input[type=checkbox]:checked + label { color: white; background-color: black;
}
input[type=checkbox] ~ ul { list-style: none; position: absolute; top: 4.4em; left: 0;
}
.nav-item { -moz-transition: left 0.1s ease-in; -o-transition: left 0.1s ease-in; -webkit-transition: left 0.1s ease-in; transition: left 0.1s ease-in; padding: 0.7em 2.5em 0.7em 1em; position: relative; left: -100%; /* Animation delay function */
}
.nav-item:nth-child(1) { -moz-transition-delay: 0.1s; -o-transition-delay: 0.1s; -webkit-transition-delay: 0.1s; transition-delay: 0.1s;
}
.nav-item:nth-child(2) { -moz-transition-delay: 0.2s; -o-transition-delay: 0.2s; -webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.nav-item:nth-child(3) { -moz-transition-delay: 0.3s; -o-transition-delay: 0.3s; -webkit-transition-delay: 0.3s; transition-delay: 0.3s;
}
.nav-item:nth-child(4) { -moz-transition-delay: 0.4s; -o-transition-delay: 0.4s; -webkit-transition-delay: 0.4s; transition-delay: 0.4s;
}
.nav-item a { color: black; text-decoration: none;
}
input[type=checkbox]:checked ~ ul .nav-item { left: 0;
}
input[type=checkbox]:checked ~ ul .nav-item:hover, input[type=checkbox]:checked ~ ul .nav-item:active { background-color: black;
}
input[type=checkbox]:checked ~ ul .nav-item:hover a, input[type=checkbox]:checked ~ ul .nav-item:active a { color: white;
} </style> <script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body> <nav> <input id="toggleNavigation" type="checkbox"> <label for="toggleNavigation" class="fontawesome-reorder"></label> <ul> <li class="nav-item"><a href="#">About</a></li> <li class="nav-item"><a href="#">Projects</a></li> <li class="nav-item"><a href="#">Links</a></li> <li class="nav-item"><a href="#">Download CV</a></li> </ul>
</nav>
</body>
</html>

Pure CSS Navigation - Script Codes CSS Codes

/* Fonts */
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,600,700);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
body { font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 400;
}
[class*="fontawesome-"]:before { font-family: 'FontAwesome', sans-serif;
}
/* Styles */
input[type=checkbox] + label { -moz-transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; -o-transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; -webkit-transition: background-color 1s ease-in, color 0.75s ease-in; -webkit-transition-delay: 0.25s, 0.1s; transition: background-color 1s ease-in 0.25s, color 0.75s ease-in 0.1s; font-size: 2rem; font-weight: 700; background-color: white; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; cursor: pointer; padding: 0.3em 0.4em 0.3em 0.4em; position: fixed; top: 0; left: 0;
}
input[type=checkbox]:checked + label { color: white; background-color: black;
}
input[type=checkbox] ~ ul { list-style: none; position: absolute; top: 4.4em; left: 0;
}
.nav-item { -moz-transition: left 0.1s ease-in; -o-transition: left 0.1s ease-in; -webkit-transition: left 0.1s ease-in; transition: left 0.1s ease-in; padding: 0.7em 2.5em 0.7em 1em; position: relative; left: -100%; /* Animation delay function */
}
.nav-item:nth-child(1) { -moz-transition-delay: 0.1s; -o-transition-delay: 0.1s; -webkit-transition-delay: 0.1s; transition-delay: 0.1s;
}
.nav-item:nth-child(2) { -moz-transition-delay: 0.2s; -o-transition-delay: 0.2s; -webkit-transition-delay: 0.2s; transition-delay: 0.2s;
}
.nav-item:nth-child(3) { -moz-transition-delay: 0.3s; -o-transition-delay: 0.3s; -webkit-transition-delay: 0.3s; transition-delay: 0.3s;
}
.nav-item:nth-child(4) { -moz-transition-delay: 0.4s; -o-transition-delay: 0.4s; -webkit-transition-delay: 0.4s; transition-delay: 0.4s;
}
.nav-item a { color: black; text-decoration: none;
}
input[type=checkbox]:checked ~ ul .nav-item { left: 0;
}
input[type=checkbox]:checked ~ ul .nav-item:hover, input[type=checkbox]:checked ~ ul .nav-item:active { background-color: black;
}
input[type=checkbox]:checked ~ ul .nav-item:hover a, input[type=checkbox]:checked ~ ul .nav-item:active a { color: white;
}
Pure CSS Navigation - Script Codes
Pure CSS Navigation - Script Codes
Home Page Home
Developer Michaela
Username Fischaela
Uploaded July 27, 2022
Rating 3
Size 3,649 Kb
Views 46,552
Do you need developer help for Pure CSS Navigation?

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!

Michaela (Fischaela) Script Codes
Create amazing love letters 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!