position: sticky can do this, but the support rate is not high. you can find the polyfill of this attribute
when you slide, absolute the div that runs away, and then use js to determine when to put it down and when to float
Previous: Why the return value of Promise.all () is ordered
Next: What is the weaving of AOP