1. I used html5 to randomly draw a few thick lines with fixed color types.
2. Can you tell whether the mouse has moved above the line?
The drawn line must have some base points. Use mathematical knowledge to determine whether the event.X and event.Y of the mouse are on the line
This is okay, but can it determine the color at the current position of the mouse?
If it is the same color as the line, then it is judged that it is on the line. Is this okay?