Created
March 5, 2018 04:26
-
-
Save Jul10l1r4/0cbb06d30762bb174b9656a5dca3fed1 to your computer and use it in GitHub Desktop.
Efeito scroll, uma simples demonstração, sem função.. sem nada.. só pra copiarem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.scroll({ | |
top: 1000, // Captura a distancia do topo onde deseja ser rolado | |
left: 0,// Faz o mesmo do top mas em um ambito horizontal | |
behavior: 'smooth' // Aqui eh onde vem toda a magica, ele suporta duas opcoes, o `smooth` e o `normal` | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment