undefinedfix
Sign in

JavaScript Vue document

M_Salehi edited in Thu, 24 Nov 2022

I don't understand the role of absolute positioning when I leave the transition. If I delete it, I just want to move it smoothly. But what does this have to do with absolute positioning

1 Replies
Zavarock
commented on Fri, 25 Nov 2022

The deletion here is a process: move the element down 30px → delete the element after moving down. 1. When you start to delete, the deleted element is set to absolute, which immediately leaves the document flow (no space is reserved for the element). At this time, the following elements can fill in the vacancy according to the animation effect. 2. If you remove absolute, the element will be deleted after the move down is completed, and the element is still in the document stream, so the following elements cannot perform animation effect, because there is no vacant position.