I have a Javascript function that takes an empty canvas and fills it. Only, as at first I do not want to display the canvas, I set the style of it, in the display attribute as "none". Now, I change the display to block (at runtime). How could I do this in Javascript?
This is the canvas in my html:
<canvas class="canvasCentral" id="bordas" width="400" height="500">
</canvas>
The style applied to the canvas is the canvasCentral class of a css file linked to my html:
.canvasCentral{
position:absolute;
top:50%;
left:50%;
transform:translate(-50%,-50%);
border:3px solid #D8D8D8;
border-radius: 20px;
display:none
}
How can I, in Javascript, at runtime change the canvas display to block?