How to make a back-to-top button using CSS and HTML only?

前端 未结 12 1594
别那么骄傲
别那么骄傲 2020-12-28 16:11

What i\'m trying to do is kind of like a back to top button but to scroll down and up to a certain point on the page! Say for instance you have a long text and

12条回答
  •  别那么骄傲
    2020-12-28 16:38

    This is the HTML only way:

    
    
    foo content
    foo bottom of page
    Back to Top
    
    

    There are quite a few other alternatives using jquery and jscript though which offer additional effects. It really just depends on what you are looking for.

提交回复
热议问题