Home >Web Front-end >HTML Tutorial >How to drag elements in Canvas in HTML5? _html/css_WEB-ITnose
RT, how to drag a single element in Canvas?
The results I searched on google basically all achieve the dragging effect by clearing the canvas and then redrawing the elements. If there are many elements in the canvas, will this method be used to implement dragging?
The same question, waiting for answers from experts. Have you found the original poster?
Yes, the animation effect of canvas is obtained by constantly redrawing
Use the concept of layers to solve it.
test