mirror of
https://github.com/Nezumi-2711/html-css-practice-two.git
synced 2026-09-22 20:01:23 +00:00
Update code
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
$width-icon-menu: 36px;
|
||||
|
||||
.icon-menu {
|
||||
@include base-icon-menu;
|
||||
|
||||
position: relative;
|
||||
width: $width-icon-menu;
|
||||
cursor: pointer;
|
||||
|
||||
&:before {
|
||||
@include icon-menu;
|
||||
|
||||
top: -10px;
|
||||
width: $width-icon-menu;
|
||||
}
|
||||
|
||||
&:after {
|
||||
@include icon-menu;
|
||||
|
||||
top: 10px;
|
||||
width: $width-icon-menu;
|
||||
}
|
||||
}
|
||||
|
||||
.toggle-menu {
|
||||
position: absolute;
|
||||
top: 46px;
|
||||
right: 21px;
|
||||
width: 36px;
|
||||
height: 27px;
|
||||
cursor: pointer;
|
||||
z-index: 1;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.toggle-menu:checked ~ .icon-menu {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.toggle-menu:checked ~ .icon-menu:before {
|
||||
top: 0;
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
|
||||
.toggle-menu:checked ~ .icon-menu:after {
|
||||
top: 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.toggle-menu:checked ~ .nav-list {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 840px) {
|
||||
.icon-menu,
|
||||
.toggle-menu {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user