scroll offsethtml
P粉205475538
P粉205475538 2023-08-17 23:52:56
0
1
432

I'm trying to do something in HTML and CSS but not sure if it actually works.

I want to make sure I add some kind of "delay" when scrolling, like slowing down the scrolling to make it softer.

Some sites do do this, I have visited some pages that scrolled differently than other sites and looked soft.

Is this possible?

P粉205475538
P粉205475538

reply all (1)
P粉868586032

sure! To achieve a smooth scrolling effect on your website, you can use the following CSS rules:

html { scroll-behavior: smooth; }

To create internal links that trigger smooth scrolling, use anchor tags like this in your HTML:

跳转到第一部分 跳转到第二部分 

By using this method, your website scrolling will feel smoother and more comfortable for users.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!