From f9decee80b9996b952b6374ecd355dd0d061c717 Mon Sep 17 00:00:00 2001 From: Annie Huang Date: Fri, 1 Mar 2024 16:17:13 +0800 Subject: [PATCH] fix: scroll bug modify contact layout --- app/src/views/LandingPage.vue | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/app/src/views/LandingPage.vue b/app/src/views/LandingPage.vue index d14c1f2..d40d628 100644 --- a/app/src/views/LandingPage.vue +++ b/app/src/views/LandingPage.vue @@ -20,10 +20,13 @@ const handleSignIn = async () => { const scrollToSection = (sectionId) => { const section = document.getElementById(sectionId) if (section) { - console.log(sectionId) - window.scrollTo({ - top: section.offsetTop, - }) + const container = document.querySelector('.overflow-y-auto') // Replace '.overflow-y-auto' with the appropriate class or selector for your container + if (container) { + container.scrollTo({ + top: section.offsetTop - container.offsetTop, + behavior: 'smooth', // Add smooth scrolling behavior if desired + }) + } } } @@ -292,24 +295,27 @@ const scrollToSection = (sectionId) => {
-

facebook 粉絲專頁: Linux Odyssey

-

Github: linux-odyssey/linux-odyssey

-

email: team@linuxodyssey.xyz

+

Facebook

+

GitHub

+

Email

+

Linux Odyssey

+

linux-odyssey/linux-odyssey

+

team@linuxodyssey.xyz