On the problem of element movement in canvas

clipboard.png

clipboard.png

A picture grows slowly when it slides up to a certain extent. Why does it bring out a line that has been entangled all night? I can"t find the reason.

Feb.26,2021

what kind of line? How much is the tilt?


use save () and restore () .
basic steps of canvas animation:

  1. Save canvas state
  2. draw animation frames
  3. restore the canvas state and redraw the next frame

I can't find out why you posted the code like this. I can only guess draw that you didn't empty the canvas before. You can try to add draw () to

.
ctx1.clearRect(0, 0, canWidth, canHeight)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bc8e48-30941.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bc8e48-30941.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?