Skip to content

Commit 11e0788

Browse files
add a "shimmer" animation to the "get started" button on hover
1 parent bcae491 commit 11e0788

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

src/css/custom.css

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,27 @@ To go further, consider looking at implementing MUI custom themes.
8989
.navbar__item-get_started {
9090
color: white;
9191
border-radius: 1rem;
92-
background-size: 200% 200%;
93-
background: linear-gradient(311deg,rgba(63,178,175,.67),rgba(80,54,163,.67) 53%);
92+
background-size: 200% 100%;
93+
background-position: 0 0;
94+
background-repeat: repeat-x;
95+
background-image: linear-gradient(131deg,rgba(80,54,163,.67),rgba(63,178,175,.67) 50%, rgba(80,54,163,.67));
9496
margin-right: 1rem;
9597
display: inline-block;
9698
font-size: smaller;
9799
}
98100

99101
.navbar__item-get_started:hover {
100102
color: white;
101-
background: linear-gradient(311deg,rgba(63,178,175,.67),rgba(80,54,163,.67) 53%);
103+
background-position: 200% 0;
104+
animation: shimmer 0.25s ease-in forwards;
105+
}
106+
107+
@keyframes shimmer {
108+
from {
109+
background-position: 0 0;
110+
}
111+
112+
to {
113+
background-position: 200% 0;
114+
}
102115
}

0 commit comments

Comments
 (0)