Navigation Panel in pure HTML5 / CSS3

Size
4,038 Kb
Views
12,144

How do I make an navigation panel in pure html5 / css3?

What is a navigation panel in pure html5 / css3? How do you make a navigation panel in pure html5 / css3? This script and codes were developed by Khoné Vongsouthi on 02 December 2022, Friday.

Navigation Panel in pure HTML5 / CSS3 Previews

Navigation Panel in pure HTML5 / CSS3 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Navigation Panel in pure HTML5 / CSS3</title> <script src="https://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <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> <link href='https://fonts.googleapis.com/css?family=Open+Sans+Condensed:300,300italic,700' rel='stylesheet' type='text/css'>
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<input id="nav-btn-open" name="nav" type="radio" value="Show Navigation" />
<label for="nav-btn-open"><i class="fa fa-bars"></i> Show Navigation</label>
<input id="nav-btn-close" name="nav" type="radio" value="Close Navigation" />
<label for="nav-btn-close"><i class="fa fa-bars"></i> Close Navigation</label>
<!-- NAV -->
<nav id="nav" role="navigation"> <strong id="nav-head">Navigation</strong> <!-- NAV - Primary --> <ul class="nav-primary"> <li class="item"><a href="#">Lorem ipsum</a></li> <li class="item"><a href="#">Dolor</a></li> <li class="item"><a href="#">Sit amet</a></li> </ul>
</nav>
<!-- MAIN -->
<article id="main"> <header id="main-head"> <h1 class="title-primary">Navigation Panel<br />in pure HTML5 / CSS3</h1> </header> <div id="main-body"> <p> For opening the navigation panel, click on the button on top left.<br /> To close this one, click again. </p> </div>
</article> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
</body>
</html>

Navigation Panel in pure HTML5 / CSS3 - Script Codes CSS Codes

/******************************************* = TYPOGRAPHY
*******************************************/
html { font-size: 62.5%;
}
body { font: 12px 'Arial', 'Helvetica Neue', 'Helvetica', sans-serif; font-size: 1.2rem;
}
/******************************************* = LAYOUT
*******************************************/
html,
body { height: 100%;
}
#nav,
#nav *,
#main,
#main * { -webit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
/******************************************* = NAV
*******************************************/
/* NAV - Button */
#nav-btn-open,
#nav-btn-close { position: absolute; left: -100%; top: 0;
}
label[for='nav-btn-open'],
label[for='nav-btn-close'] { position: absolute; overflow: hidden; z-index: 30; left: 0; top: 0; width: 50px; height: 50px; line-height: 50px; text-align: center; /*text-indent: -100%;*/ background: #000; color: #fff; cursor: pointer; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
}
label[for='nav-btn-open']:hover,
label[for='nav-btn-open']:focus,
label[for='nav-btn-close']:hover,
label[for='nav-btn-close']:focus { color: #3cf;
}
label[for='nav-btn-open'] .fa,
label[for='nav-btn-close'] .fa { /*position: absolute; left: 0; top: 0;*/ width: 100%; height: 100%; font-size: 28px; font-size: 2.8rem; line-height: 50px; /*text-indent: 0;*/
}
/* NAV - Button - Open */
#nav-btn-open:checked ~ label[for='nav-btn-open'] { display: none;
}
/* NAV - Button - Close */
#nav-btn-close,
label[for='nav-btn-close'] { display: none;
}
#nav-btn-open:checked ~ #nav-btn-close,
#nav-btn-open:checked ~ label[for='nav-btn-close'] { display: block;
}
#nav { position: absolute; z-index: 20; left: -100%; top: 0; padding: 75px 25px; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); opacity: 0; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
}
#nav-btn-open:checked ~ #nav { left: 0; opacity: 1;
}
#nav-btn-close:checked ~ #nav { left: -100%;
}
#nav-head { display: block; margin-bottom: 10px; font: 300 30px 'Open Sans Condensed', sans-serif; font-size: 3rem; text-transform: uppercase; color: #fff;
}
.nav-primary,
.nav-primary .item { margin: 0; padding: 0; list-style: none; font: 800 16px 'Open Sans Condensed', sans-serif; font-size: 1.6rem;
}
.nav-primary .item { display: block;
}
.nav-primary .item + .item { margin-top: 2px;
}
.nav-primary .item,
.nav-primary .item a:link,
.nav-primary .item a:visited { color: #fff; text-decoration: none; -webkit-transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
}
.nav-primary:hover a,
.nav-primary:focus a { opacity: .1;
}
.nav-primary .item a:hover,
.nav-primary .item a:focus,
.nav-primary .item a:active { padding-left: 5px; color: #3cf; opacity: 1;
}
/******************************************* = MAIN
*******************************************/
#main { position: relative; z-index: 10; padding: 40px 80px; height: 100%; font-family: 'Open Sans Condensed', sans-serif; background: #3cf; color: #fff;
}
/* MAIN - Header */
.title-primary { font-weight: 300; font-size: 70px; font-size: 7rem; line-height: 70px; text-transform: uppercase;
}
/* MAIN - Body */
#main-body { font-weight: 700; font-size: 18px; font-size: 1.8rem;
}
#main-head + #main-body { margin-top: 40px;
}
Navigation Panel in pure HTML5 / CSS3 - Script Codes
Navigation Panel in pure HTML5 / CSS3 - Script Codes
Home Page Home
Developer Khoné Vongsouthi
Username khone-vongsouthi
Uploaded December 02, 2022
Rating 3
Size 4,038 Kb
Views 12,144
Do you need developer help for Navigation Panel in pure HTML5 / CSS3?

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!

Khoné Vongsouthi (khone-vongsouthi) 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!