Excuse me, how do I get the x, y values in this case?

as shown in the figure, we have a requirement that we will embed a large number of different lengths of DIV2, in DIV1 (similar to a viewport). I need to know the distance from the top edge of the DIV2 to the top of the viewport (x), and the distance from the bottom edge of the DIV2 to the top of the viewport (y)

.

how do I get these two values?

Mar.13,2021

ele.getBoundingClientRect()

// 
// div1position

x: div1.scrollTop - div2.offsetTop
y: div2.offsetHeight - x
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-1e3f018-4352a.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-1e3f018-4352a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?