started hamburger menu
This commit is contained in:
parent
615a58ce28
commit
b539c3592a
2 changed files with 95 additions and 37 deletions
|
@ -10,29 +10,84 @@ header {
|
|||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
|
||||
z-index: 1000;
|
||||
font-family: var(--font-family);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
header li {
|
||||
display: inline-block;
|
||||
margin: 0 15px;
|
||||
.nav-links{
|
||||
display: flex;
|
||||
gap: 15px;
|
||||
}
|
||||
|
||||
header img {
|
||||
height: 2em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
header a,
|
||||
header li button {
|
||||
color: var(--header-text-color); /* Use the new header text color */
|
||||
text-decoration: none;
|
||||
transition: color 0.3s;
|
||||
.nav-btn{
|
||||
background: transparent;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
font-size: 1em;
|
||||
cursor: pointer;
|
||||
/* color */
|
||||
}
|
||||
|
||||
header a:hover,
|
||||
header li button:hover {
|
||||
color: var(--input-button-color); /* Keep the hover color */
|
||||
.nav-btn:hover{
|
||||
/* color */
|
||||
}
|
||||
|
||||
.hamburger{
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.hamburger span{
|
||||
width: 25px;
|
||||
height: 3px;
|
||||
background-color: var(--header-text-color);
|
||||
margin: 4px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.hamburger.open span:nth-child(1){
|
||||
transform: rotate(45deg) translate(5px, 5px);
|
||||
}
|
||||
|
||||
.hamburger.open span:nth-child(2){
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.hamburger.open span:nth-child(3){
|
||||
transform: rotate(-45deg) translate(5px, -5px);
|
||||
}
|
||||
|
||||
.header-button{
|
||||
|
||||
}
|
||||
.header-button img{
|
||||
height: 8vh;
|
||||
}
|
||||
|
||||
@media (max-width:768px) {
|
||||
.nav-links{
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 60px;
|
||||
right: 0;
|
||||
/* background color */
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.nav-links.active{
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-btn{
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.hamburger{
|
||||
display: flex;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue