<header>
	<input type="checkbox" id="button">
	<label for="button">
		<span></span>
		<span></span>
		<span></span>
	</label>

	<ul>
		<li><a href="#">home</a></li>
		<li><a href="#">about</a></li>
		<li><a href="#">services</a></li>
		<li><a href="#">portfolio</a></li>
		<li><a href="#">contact</a></li>
	</ul>
</header>
/* reset start */
* {
	margin: 0;
	padding: 0;
	outline: 0;
	box-sizing: border-box;
}

a {
	text-decoration: none;
}

li {
	list-style-type: none;
}
/* reset end */

/* our code start */
header {
	position: relative;
	padding: 10px;
	background: #333333;
	text-align: center;
}

#button {
	display: none;
}

label {
	width: 60px;
	overflow: hidden;
	display: inline-block;
	background: #666;
	height: 50px;
	padding-top: 5px;
	cursor: pointer;
}

label span {
	width: 50px;
	height: 10px;
	display: block;
	margin: 0 auto;
	margin-bottom: 5px;
	background: #ffffff;
}

ul {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%) scaleY(.5);
	transform-origin: top center;
	text-align: left;
	white-space: no-wrap;
	background: #000;
	padding: 10px 0 15px;
	border: 1px solid #333;
	visibility: hidden;
	opacity: 0;
	
	transition: all .3s ease;
}

#button:checked ~ ul {
	visibility: visible;
	opacity: 1;
	transform: translateX(-50%) scaleY(1);
}

ul a {
	color: #fff;
	display: block;
	padding: 10px 30px;
	font-size: 20px;
	text-transform: capitalize;
	transition: all .5s ease;
}

ul a:hover {
	background: #fff;
	color: #333;
}
/* our code end */

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.