mirror of
https://github.com/yusufipk/natours-react.git
synced 2026-09-11 11:06:10 +00:00
styled navigation buttom
This commit is contained in:
@@ -7,7 +7,8 @@ function Navigation() {
|
|||||||
id="navi-toggle"
|
id="navi-toggle"
|
||||||
/>
|
/>
|
||||||
<label for="navi-toggle" className="navigation__button">
|
<label for="navi-toggle" className="navigation__button">
|
||||||
Menu
|
<i className="fa fa-bars navigation__button--bars"></i>
|
||||||
|
<i className="fa fa-times navigation__button--times"></i>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div className="navigation__background"> </div>
|
<div className="navigation__background"> </div>
|
||||||
|
|||||||
@@ -12,6 +12,19 @@
|
|||||||
right: 6rem;
|
right: 6rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
z-index: 2000;
|
z-index: 2000;
|
||||||
|
box-shadow: $shadow-light;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&--bars,
|
||||||
|
&--times {
|
||||||
|
@include center-horizontal-vertical;
|
||||||
|
font-size: 3.5rem;
|
||||||
|
text-align: center;
|
||||||
|
transition: opacity 0.2s;
|
||||||
|
}
|
||||||
|
&--times {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__background {
|
&__background {
|
||||||
@@ -26,8 +39,7 @@
|
|||||||
$color-primary-dark
|
$color-primary-dark
|
||||||
);
|
);
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
transition: all 0.8s cubic-bezier(0.85, 0, 0.15, 1);
|
||||||
transform: scale(100);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&__nav {
|
&__nav {
|
||||||
@@ -35,14 +47,19 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
left: 0;
|
||||||
z-index: 1500;
|
z-index: 1500;
|
||||||
|
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
transition: all 0.8s cubic-bezier(0.68, -0.6, 0.32, 1.6);
|
||||||
}
|
}
|
||||||
|
|
||||||
&__list {
|
&__list {
|
||||||
@include center-horizontal-vertical;
|
@include center-horizontal-vertical;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__item {
|
||||||
@@ -81,4 +98,22 @@
|
|||||||
transform: translateX(1rem);
|
transform: translateX(1rem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__checkbox:checked ~ &__background {
|
||||||
|
transform: scale(80);
|
||||||
|
}
|
||||||
|
|
||||||
|
&__checkbox:checked ~ &__nav {
|
||||||
|
opacity: 1;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
//ICON
|
||||||
|
&__checkbox:checked ~ &__button &__button--times {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__checkbox:checked ~ &__button &__button--bars {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user