-3
I made a type of typeWrite(typewriter), with html css and javascript. I put an overflow: scroll on my div where when she breaks the line I wanted the scroll to kind of accompany the content ,without me having to scroll to it .
In short : I want that when it reaches the limit of this div , somehow it would automatically follow the text without me having to scroll with my mouse .
//CSS
.display {
width: 30rem;
height: 3rem;
border: 1px solid white;
background-color: white;
margin-top: 180px;
padding: 0px 30px 40px 30px;
border-radius: 10px;
text-align: center;
font-size: 24px;
word-break: break-all;
overflow: hidden;
overflow-y:scroll;
min-height: 50px;
}
//HTML
<div class="display" id="tela"> </div>
I found show the way you did. But tbm found only 1 command that does what I wanted it to be screen.scrollTop = screen.scrollHeight; . in this command the bar always gets down was basically what I wanted . But I’ll delete the one I did and I’ll do it in your obg way
– Joao Vitor Alves Muniz