I was looking for an animation that smoothens the scroll process when a new element is added into a scroll list.
Example: When a new element comes to the list, my code catches the newest element and puts it into a scroll list. New elements are added to the top and the old elements are pushed to the bottom. My code is very static and I would like to see the animation of the "push" to be smooth and the elements that overflow need to be blurred below. How can we achieve this?
CSS:
.transactions-list {
background-color: #eee;
padding-top:0rem;
width: 200px;
height: 100px;
border: 1px dotted black;
overflow: scroll; /* Add the ability to scroll */
-ms-overflow-style: none;
scrollbar-width: none;
border-radius: 1rem;
direction: ltr;
}
HTML:
<div class="transactions-list">
<p *ngFor="let element of transactions.slice().reverse()">{{element}}</p>
</div>
question from:
https://stackoverflow.com/questions/65857001/css-smooth-animation-for-new-elements-added-in-a-scroll-list 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…