Home > Web Front-end > JS Tutorial > Introduction to a simple elastic return to top JS code implementation_javascript skills

Introduction to a simple elastic return to top JS code implementation_javascript skills

WBOY
Release: 2016-05-16 17:32:30
Original
1104 people have browsed it

I made a function like this yesterday and posted it for reference.
HTML/JS/CSS code:

Copy code The code is as follows:





Flexible return to top JS code














When it exceeds the scope of the first screen, the TOP button will appear, otherwise it will be automatically hidden.






Rendering:
The page scroll bar is at the low end
1.
Introduction to a simple elastic return to top JS code implementation_javascript skills
2. Click to return to the top and hide it.
Introduction to a simple elastic return to top JS code implementation_javascript skills
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template