ele
element relative to the target
element.// Get the top, left coordinates of two elementsconst eleRect = ele.getBoundingClientRect();const targetRect = ele.getBoundingClientRect();// Calculate the top and left positionsconst top = eleRect.top - targetRect.top;const left = eleRect.left - targetRect.left;