Skip to content

Commit 00887ed

Browse files
committed
Update lang.html
1 parent e3ad7e3 commit 00887ed

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

homepage/lang.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,13 @@
198198
window.addEventListener('scroll', () => {
199199

200200
const scrollPos = scrollEl.scrollTop;
201-
const opacityPercent = 1 - (scrollPos / scrollEnd);
202-
logo.style.opacity = opacityPercent;
201+
202+
if (scrollPos <= scrollEnd) {
203+
204+
const opacityPercent = 1 - (scrollPos / scrollEnd);
205+
logo.style.opacity = opacityPercent;
206+
207+
}
203208

204209
});
205210

0 commit comments

Comments
 (0)