Js get mouse position setting tip pop-up window

the clientX Y of event, which I obtained, locates the fixed to the left and top tip of the tip pop-up window.

but it doesn"t feel good and tip can"t keep up with fast mouse movement with a certain delay.

is there a better way to experience it encapsulated by yourself

Apr.07,2021

No, javascript is like this. There is a delay in the event itself. If the mouse moves too fast, the number of, event activation is less. It is suggested that you can change the position of the tip through transform to form an animation and move along with the direction of the mouse, so that you can move it correctly when it is fast, and will not flash


from the product point of view, it is meaningless to let tooltip run back and forth with the mouse.

Menu