Skip to content

Commit 285f011

Browse files
committed
update avatar
1 parent 69a0ba8 commit 285f011

File tree

3 files changed

+44
-5
lines changed

3 files changed

+44
-5
lines changed

resources/_gen/assets/scss/scss/coder.scss_fd4b5b3f9a48bc0c7f005d2f7a4cc30f.content

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,26 @@ a[href^="#fn:"]:after {
289289
.avatar img {
290290
width: 20rem;
291291
height: auto;
292-
border-radius: 50%;
293-
opacity: 1;
294-
animation: fadeIn 3s ease; }
292+
border-radius: 50%; }
295293
@media only screen and (max-width: 768px) {
296294
.avatar img {
297295
width: 10rem; } }
296+
.avatar img:hover {
297+
animation: shake 0.82s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
298+
transform: translate3d(0, 0, 0);
299+
backface-visibility: hidden;
300+
perspective: 1000px; }
301+
302+
@keyframes shake {
303+
10%, 90% {
304+
transform: translate3d(-1px, 0, 0); }
305+
20%, 80% {
306+
transform: translate3d(2px, 0, 0); }
307+
30%, 50%, 70% {
308+
transform: translate3d(-4px, 0, 0); }
309+
40%, 60% {
310+
transform: translate3d(4px, 0, 0); } }
311+
298312
@keyframes fadeIn {
299313
0% {
300314
opacity: 0; }

themes/hugo-coder/assets/scss/_content.scss

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,38 @@
8282
width: 20rem;
8383
height: auto;
8484
border-radius: 50%;
85-
opacity: 1;
86-
animation: fadeIn 5s ease;
85+
// opacity: 1;
86+
// animation: fadeIn 5s ease;
8787
@media only screen and (max-width : 768px) {
8888
width: 10rem;
8989
}
9090
}
9191

92+
.avatar img:hover {
93+
animation: shake 0.82s cubic-bezier(.36,.07,.19,.97) both;
94+
transform: translate3d(0, 0, 0);
95+
backface-visibility: hidden;
96+
perspective: 1000px;
97+
}
98+
99+
@keyframes shake {
100+
10%, 90% {
101+
transform: translate3d(-1px, 0, 0);
102+
}
103+
104+
20%, 80% {
105+
transform: translate3d(2px, 0, 0);
106+
}
107+
108+
30%, 50%, 70% {
109+
transform: translate3d(-4px, 0, 0);
110+
}
111+
112+
40%, 60% {
113+
transform: translate3d(4px, 0, 0);
114+
}
115+
}
116+
92117
@keyframes fadeIn{
93118
0%{
94119
opacity: 0;
-14.1 KB
Loading

0 commit comments

Comments
 (0)