Scroll de alto rendimiento a plugin superior-ScrollTop-JS

Tiempo de ejecución: 30 minutos. Empezar

Autor: HaiBach
Views Total: 1,206
Sitio oficial: Ir a la web
Actualizado: December 3, 2017
Licencia: MIT

Vista prévia

Scroll de alto rendimiento a plugin superior-ScrollTop-JS

Descripción

ScrollTop-JS is a lightweight JavaScript back to top plugin which provides the smooth, high-performance scroll to top animation using the window.requestAnimationFrame() API.

¿Cómo funciona?

Create a scroll to top button at the bottom of your main content.

<a id="scrolltop" href="#">Top</a>

Download and load the JavaScript file ‘scrolltop.js’ in the document when needed.

<script src="scripts/scrolltop.js"></script>

That’s it. Feel free to customize the scroll to top button in the CSS.

#scrolltop {

position: fixed;

bottom: 10px;

right: 10px;

width: 50px;

height: 50px;

background-color: #C1272D;

border-radius: 4px;

color: #fff;

line-height: 50px;

text-decoration: none;

text-align: center;
}

Te puede interesar: