xxxxxxxxxx
html {
scroll-behavior: smooth;
/* Add any other CSS styles for the HTML element */
}
/* Additional CSS styles for your webpage */
xxxxxxxxxx
html {
scroll-behavior: smooth;
}
/* No support in IE, or Safari
You can use this JS polyfill for those */
http://iamdustan.com/smoothscroll/
xxxxxxxxxx
/* Apply smooth scroll to all anchor links */
a {
transition: 0.5s ease-in-out;
scroll-behavior: smooth;
}
/* Optional: Customizes scroll offset for different browsers */
@-moz-document url-prefix() {
html {
scroll-behavior: smooth;
scroll-padding-top: 100px; /* Adjust offset as needed */
}
}
@supports (scroll-behavior: smooth) {
html, body {
scrollbar-width: thin;
scrollbar-color: transparent transparent;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
width: 6px;
background-color: transparent;
}
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
background-color: transparent;
}
}
xxxxxxxxxx
html {
scroll-behavior: smooth;
}
:target {
scroll-margin-top: 15em;
}