Como fazer rolar automaticamente até o fim no CSS
let objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;
Tough Tamarin
let objDiv = document.getElementById("divExample");
objDiv.scrollTop = objDiv.scrollHeight;
window.setInterval(function() {
var elem = document.getElementById('data');
elem.scrollTop = elem.scrollHeight;
}, 5000);
const scrollToTop = () => {
const scrollTopButton = document.getElementById('scrollTopButton');
scrollTopButton.addEventListener('click', () => {
window.scrollTo(0, document.body.scrollHeight);
});
};