burger menu css
/* Link to Codepen in source for PoC */
<style>
.container {
background: dodgerblue;
padding: 20px;
height: 70px;
}
#hamburger {
width: 40px;
height: 40px;
display: block;
position: relative;
float: right;
transform: rotate(0deg);
transition: .5s ease-in-out;
cursor: pointer;
}
#hamburger span {
display: block;
position: absolute;
height: 4px;
width: 100%;
background: white;
border-radius: 9px;
opacity: 1;
left: 0;
transform: rotate(0deg);
transition: .25s ease-in-out;
}
#hamburger span:nth-child(1) {
top: 0px;
}
#hamburger span:nth-child(2) {
top: 12px;
}
#hamburger span:nth-child(3) {
top: 24px;
}
#hamburger.open span:nth-child(1) {
top: 14px;
transform: rotate(135deg);
}
#hamburger.open span:nth-child(2) {
opacity: 0;
left: -60px;
}
#hamburger.open span:nth-child(3) {
top: 14px;
transform: rotate(-135deg);
}
</style>
<body>
<div class="container">
<div id="hamburger">
<span></span>
<span></span>
<span></span>
</div>
</div>
</body>
<div class="container" onclick="myFunction(this)">
<div
class="bar1"></div>
<div class="bar2"></div>
<div
class="bar3"></div>
</div>
Also in CSS:
- jquery add external css to head
- disable scroll css
- edge ontouchmove does not work correctly
- how to trim leading spaces in html using css
- redesign html select
- how to style hyperlink text css
- mixin for transition css
- css image radius
- css flex
- jquery element css
- access css and js files inside resources folder in laravel
- adding background image css
- scss media query
- css color gradient background full height
- css doesnt update
- red asterix css
- css style scrollbar
- como botar um separador display flex quebra de linha
- how to apply different properties to different paragraphs in css
- html font white text with black border
- input uppercase with css
- css comment tag
- como fazer listrada css
- css hide timeline