How to create Full Screen Menu | HTML & CSS Project - Frontend everything
Hello Everyone 👋 Welcome to My New Blog. Today I have made an Amazing Full Screen Menu with the help of HTML and CSS Only! 😍
I am Piyush, Sharing About Web development Daily. You can also check out me at @frontendeverything.
Before starting the blog, you might think about where you can use this project in real-life-based projects. So it's an Amazing Full Screen Menu that you can use in your own blog project. So it will look attractive.
Let's start making these amazing Full Screen Menu Using HTML & CSS step by step.
So that was the preview now let us start making the project 😄 First, we will code HTML then CSS, and also I have shared codepen ink to make it easier for you.
HTML 🎈( step - 1)
In HTML we have used header and div tags for the containers.
input {
display: none;
}
.open {
background-color: #3c3c3c;
width: 24px;
height: 4px;
display: block;
border-radius: 2px;
cursor: pointer;
position: relative;
top: 8px;
}
.open:before {
content: "";
background-color: #3c3c3c;
width: 24px;
height: 4px;
display: block;
border-radius: 2px;
position: relative;
top: -8px;
transform: rotate(0deg);
transition: all 0.3s ease;
}
.open:after {
content: "";
background-color: #3c3c3c;
width: 24px;
height: 4px;
display: block;
border-radius: 2px;
position: relative;
top: 4px;
transform: rotate(0deg);
transition: all 0.3s ease;
}
.menuOpen {
width: 24px;
height: 20px;
display: block;
padding: 15px;
cursor: pointer;
float: right;
}
.menuOpen:hover .open:before {
top: -9px;
}
.menuOpen:hover .open:after {
top: 5px;
}
.menu {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
background: rgba(255, 135, 2, 0.9);
}
.menu label {
width: 30px;
height: 30px;
position: absolute;
right: 20px;
top: 20px;
background-size: 100%;
cursor: pointer;
}
.menu .menuContent {
position: relative;
top: 50%;
font-size: 54px;
text-align: center;
padding-bottom: 20px;
margin-top: -170px;
}
.menu ul {
list-style: none;
padding: 0;
margin: 0 auto;
}
.menu ul li a {
display: block;
color: white;
text-decoration: none;
transition: color 0.2s;
font-family: Trebuchet MS;
text-transform: uppercase;
padding: 10px 0;
}
.menu ul li a:hover {
color: #ff8702;
}
.menu ul li:hover {
background: white;
}
.menuEffects {
opacity: 0;
visibility: hidden;
transition: opacity 0.5s, visibility 0.5s;
}
.menuEffects ul {
transform: translateY(0%);
transition: all 0.5s;
}
#menuToggle:checked ~ .menuEffects {
opacity: 1;
visibility: visible;
transition: opacity 0.5s;
}
#menuToggle:checked ~ .menuEffects ul {
opacity: 1;
}
#menuToggle:checked ~ .menuOpen .open {
background-color: transparent;
}
#menuToggle:checked ~ .menuOpen .open:before {
content: "";
background-color: white;
transform: rotate(45deg);
position: absolute;
top: 0;
right: 0;
z-index: 1;
}
#menuToggle:checked ~ .menuOpen .open:after {
content: "";
background-color: white;
transform: rotate(-45deg);
position: relative;
top: 0;
right: 0;
z-index: 1;
}
#menuToggle:not(:checked) ~ .menuEffects ul {
transform: translateY(-30%);
}
After the HTML we will design the Full Screen Menu with CSS..
Output till now
CSS🎈( step - 2)
<div id="menuArea">
<input type="checkbox" id="menuToggle"></input>
<label for="menuToggle" class="menuOpen">
<div class="open"></div>
</label>
<div class="menu menuEffects">
<label for="menuToggle"></label>
<div class="menuContent">
<ul>
<li><a href="#">MENU 1</a></li>
<li><a href="#">MENU 2</a></li>
<li><a href="#">MENU 3</a></li>
<li><a href="#">MENU 4</a></li>
</ul>
</div>
</div>
</div>
Now we have done the CSS coding as well, now we will see the final output and also check the codepen link mentioned below.
Final Output
The codepen link is here for making your work easier!
.
If you found any value in this blog you can support me by buying me a coffee.
.
.
.
.
.
Thank You For Scrolling Till here 😊. If You gain any knowledge then do checkout me at @frontendeverything. I am Piyush 🎉 I provide Content related to programming, technology, web development Daily.
.