THIS IS A HTML CSS CODE OF HOW TO MAKE HAMBURGER MENU IN YOUR WEBSITES #74
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
//////////////////////HTML PART//////////////////////////
<title>CSS HAMBURGER</title>.menu-items
{
/* display: none; /
transform: translateX(-110%);
padding-top: 60px;
padding-bottom: 20px;
transition: transform 0.3s ease-in-out;
padding-left: 10px;
/ border: 2px solid green; /
width: 30%;
background: rgb(63, 63, 63);
border-radius: 10px;
margin-top: 0;
margin-left: 1px;
}
.menu-items li
{
margin-bottom: 1rem;
font-size: 1.5rem;
font-size: 15px;
color: white;
}
.menu-items a
{
color: white;
text-decoration: none;
}
.menu-items a:hover
{
color: red;
/ cursor: pointer; /
}
.hamburger-menu
{
position: relative;
/ border: 2px solid red; /
}
/ .lala
{
padding: 1rem;
} /
.hamburger-menu input[type="checkbox"]
{
/ display: block; */
}
.hamburger-menu input[type="checkbox"]:checked ~ .menu-items
{
display: block;
transform: translateX(0%);
/* background: rgb(172, 172, 172); */
}
.hamburger-menu input[type="checkbox"]:checked ~ .hamburger-lines
{
/* background: rgb(172, 172, 172); /
/ background: rgb(63, 63, 63);*/
background: transparent;
}
.hamburger-menu input[type="checkbox"]:checked ~ .hamburger-lines .line
{
/* color: white; */
background: white;
}
.hamburger-lines .line1
{
transform-origin: 0% 0%;
}
.hamburger-lines .line3
{
transform-origin: 0% 100%;
}
.hamburger-menu input[type="checkbox"]:checked ~ .hamburger-lines .line1
{
transform: rotate(45deg);
transition: transform 0.3s ease-out;
}
.hamburger-menu input[type="checkbox"]:checked ~ .hamburger-lines .line3
{
transform:rotate(-45deg) ;
transition: transform 0.3s ease-out;
}
.hamburger-menu input[type="checkbox"]:checked ~ .hamburger-lines .line2
{
opacity: 0;
/* transition: transform 0.3s ease-in-out; */
}
////////////////CODE BY ADITI MAHABOLE////////////