+ 1
Can I put background also canvas?
Canvas background in body
5 Respostas
+ 2
(please clarify if my guess is wrong)
I think you mean "have the canvas behind other elements / the DOM, as if it were the background"*
If I were researching this, I would look at ways to remove the canvas element from the "document flow", so that it did not interact with anything else in the DOM.
I believe this is usually done with the CSS attribute 'position' (absolute, relative), and I would also at least review the attributes 'float' (for a containing <div>) and 'z-index'.
* If you mean 'canvas has a separate background and foreground' ... a canvas has 1 layer / draw space (use buffers and draw regions)
+ 2
You meant to write canvas and background in body?
if so "yes"
+ 1
why not?
+ 1
How?
+ 1
in the example below there is a video in the background: you can easily use the same approach for your canvas (see the css for the z index)
https://code.sololearn.com/WrBG0rrlpUN9/?ref=app