#Hey everyone, this is my portfolio (https://por...
1 messages · Page 1 of 1 (latest)
Hey, nice portfolio design i would make the lower text at the start a bit brighter for readability. Could you share what you are using for the appearing content on scroll?
Is it just an observer or a specific libary
Yes, I'm using Observer and added its polyfill.
What do you mean polyfill?
adding support to the older browsers
you don't wait the browser to support this feature so some developers add this functionality to the browser api
is that clear ?
Got it👍
this is chatgpt answer about it
A polyfill is a piece of code that provides modern functionality on older browsers or platforms that do not support it natively.
Polyfills are often used in web development to ensure that web applications or websites work consistently across different browsers and platforms. For example, if a developer wants to use a modern JavaScript feature that is not supported in older browsers, they can use a polyfill to provide that functionality to those browsers.
Polyfills typically detect whether a certain feature is supported by the browser or platform, and if not, provide a fallback implementation of the feature. They can be included in a project as a separate JavaScript file or as part of a larger library or framework.
hope it helps!
Ahh, I see. I'm slightly dyslexic, I apologize
no problem at all!
how'd u get smooth scrolling to work
you can do the following:-
const section1 = document.querySelector('#section1');
const section1Pos = section1.offsetTop;
window.scrollTo({
top: section1Pos,
behavior: 'smooth'
});
or you can use css
scroll-behavior: smooth;