Please tell me how to follow the mouse to move relative to the parent box.

clipboard.png

this movement is animated. Do I think js calculated the assignment?
the most important thing is that his two moving bars are relative to the outside parent box, and the elements are also in the parent box.
website address is: portal

.

to see your effect, you need js to calculate the position and width of the horizontal and vertical bars


var oPosition = $(this).position();   
$(".horizontal").stop().animate({
    top: oPosition.top   
},100)

resolved

Menu