How to calculate the distance between two div

clipboard.png


you can use getBoundingClientRect () to get the vertical distance from the element to the window, and then calculate the difference between the two vertical distances


Emergency title 1 is the list of ulli if this is a list, you can directly get the height of the ul
or the offsettop of the first offsettop and the second div-the first distance comes out

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b31697-2bd95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b31697-2bd95.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?