style.css_7
style.css_7
css
:root {
--color-bg: oklch(0.518 0.069 283.726);
--color-hover: oklch(0.535 0.074 297.532);
}
label {
display: none;
}
nav {
margin: 100px auto;
width: 50%;
height: 100px;
background-color: var(--color-bg);
border-radius: 10px;
}
.menu {
display: flex;
justify-content: space-around;
align-items: center;
border-radius: 10px;
}
.menu a {
width: 20%;
display: flex;
align-items: center;
justify-content: center;
height: 90px;
border-radius: 10px;
margin: 5px;
text-decoration: none;
font-family: Arial, Helvetica, sans-serif;
color: white;
}
a:hover {
background-color: var(--color-hover);
}
.menu {
display: none;
}
.menu a {
width: 50%;
}
label {
display: flex;
justify-content: center;
align-items: center;
font-size: 40px;
color: white;
cursor: pointer;
}
#toggle:checked + .menu {
display: flex;
flex-direction: column;
background-color: var(--color-bg);
height: 220px;
}
}