Home >Web Front-end >HTML Tutorial >html5, can collision be detected? _html/css_WEB-ITnose
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?