Refactor ScrollToTop.scss to add hover animation

This commit is contained in:
dertyp7
2024-01-13 18:43:42 +01:00
parent 0edfa1eeef
commit 07323b2028

View File

@@ -11,23 +11,33 @@
transform: rotate(0deg); transform: rotate(0deg);
&:hover { &:hover {
animation: pulseUp 1s infinite; animation: pulseUp 1s 2;
}
@media screen and (min-width: 768px) {
&:hover {
animation: pulseUp 1s infinite;
}
} }
} }
&.down { &.down {
transform: rotate(-180deg); transform: rotate(-180deg);
&:hover {
animation: pulseDown 1s 2;
}
@media screen and (min-width: 768px) { @media screen and (min-width: 768px) {
width: 50px; width: 50px;
height: 50px; height: 50px;
position: fixed; position: fixed;
bottom: 15px; bottom: 15px;
right: 50%; right: 50%;
}
&:hover { &:hover {
animation: pulseDown 1s infinite; animation: pulseDown 1s infinite;
}
} }
} }
} }