+ 3

How to make a canvas animate?

I am trying to make a canvas seems rolling but I don't know how. So if any one can help me please do it in the link below https://code.sololearn.com/WKw8S5R3r8rq/#html

25th Feb 2017, 10:48 AM
Mohamad Abdelhafiz
Mohamad Abdelhafiz - avatar
1 Odpowiedź
+ 1
You have mistakes in your html code: - you have set two attribute id in your <button>: <button id="throw_dice" onClick ="RandomDice()" id="push">Roll Dice</button> - you have a duplicate dice element ( the 'first_dice' ) at start, and just after the <button> <label id="first_dice"></label> Deleting the second id and the duplicate dice, seems to be enough to make your code right working ;)
25th Feb 2017, 4:12 PM
visph
visph - avatar