Home >Web Front-end >HTML Tutorial >How to drag elements in Canvas in HTML5? _html/css_WEB-ITnose

How to drag elements in Canvas in HTML5? _html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:461065browse

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?


Reply to the discussion (solution)

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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn