+ 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
1 Answer
+ 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 ;)