1515 | 是一名 在读博士研究生、
1616 span.inline-word 博主
1717 .title1
18- | 我的GPG Key:
18+ | GPG Key:
1919 span.inline-word
2020 a( href ="https://keys.openpgp.org/search?q=B8674F373ACBD2AD" ) B8674F373ACBD2AD
21+ .title1
22+ | LinkedIn:
23+ span.inline-word
24+ a( href ="https://www.linkedin.com/in/yizhanfan" ) yizhanfan
25+
2126 .aboutsiteTips.author-content-item
2227 .author-content-item-tips 追求
2328 h2
3338 span( data-up ) 代码
3439 |
3540 span( data-show ) 程序
36-
37- .hello-about
38- .cursor ( style ='translate:none;rotate:none;scale:none ;transform:translate(721px,180px) ' )
39- .shapes
40- .shape.shape-1 ( style ='translate:none;rotate:none;scale:none;transform:translate(721px,180px) ' )
41- .shape.shape-2 ( style ='translate:none;rotate:none;scale:none;transform:translate(721px,180px) ' )
42- .shape.shape-3 ( style ='translate:none;rotate:none;scale:none;transform:translate(721px,180px) ' )
43- .content
44- h1 Hello there!
41+ .author-content
42+ .author-content-item .hello-about
43+ .cursor ( style ='position: absolute;top: 50%;left: 50% ;transform: translate(-50%, -50%); ' )
44+ .shapes
45+ .shape.shape-1 ( style ='position: absolute;top: 50%;left: 50%; ' )
46+ .shape.shape-2 ( style ='position: absolute;top: 50%;left: 50%; ' )
47+ .shape.shape-3 ( style ='position: absolute;top: 50%;left: 50%; ' )
48+ .content
49+ h1 Hello there!
4550
4651 .author-content
4752 .author-content-item.skills
@@ -399,19 +404,25 @@ script.
399404 clearInterval (pursuitInterval);
400405 });
401406
402- var helloAboutEl = document .querySelector (' .hello-about' )
403- helloAboutEl .addEventListener (" mousemove" , evt => {
404- const mouseX = evt .offsetX ;
405- const mouseY = evt .offsetY ;
406- gsap .set (" .cursor" , {
407- x: mouseX,
408- y: mouseY,
409- })
407+ const helloAboutEl = document .querySelector (' .hello-about' )
410408
411- gsap .to (" .shape" , {
412- x: mouseX,
413- y: mouseY,
414- stagger: - 0.1
415- })
409+ helloAboutEl .addEventListener (" mousemove" , evt => {
410+ const mouseX = evt .offsetX - helloAboutEl .offsetWidth / 2 ;
411+ const mouseY = evt .offsetY - helloAboutEl .offsetHeight / 2 ;
412+
413+ gsap .to (" .cursor" , {
414+ x: mouseX,
415+ y: mouseY,
416+ duration: 0.2 ,
417+ ease: " power2.out"
416418 })
419+
420+ gsap .to (" .shape" , {
421+ x: mouseX,
422+ y: mouseY,
423+ stagger: - 0.1 ,
424+ duration: 0.6 ,
425+ ease: " power3.out"
426+ })
427+ })
417428 })
0 commit comments