Mam element canvas, ktory przykrywa inne elementy. Z poczatku sa one widozcne poniewaz canvas jest przezroczysty.
Pytanie: jak wyczyscic canvas aby znow byl przezroczysty?
Taki kod nie dziala:
Kod
c=document.getElementById('canvas').getContext('2d');
c.fillStyle='transparent';
c.fillRect(0,0,500,500);
c.fillStyle='transparent';
c.fillRect(0,0,500,500);