+ 1

Can I put background also canvas?

Canvas background in body

16th Jun 2018, 1:47 AM
Alan Carreño Fiestas
Alan Carreño Fiestas - avatar
5 ответов
+ 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)
16th Jun 2018, 2:48 AM
Kirk Schafer
Kirk Schafer - avatar
+ 2
You meant to write canvas and background in body? if so "yes"
16th Jun 2018, 2:30 AM
oTARANo
oTARANo - avatar
+ 1
why not?
16th Jun 2018, 2:12 AM
Dmitriy
Dmitriy - avatar
+ 1
How?
16th Jun 2018, 2:13 AM
Alan Carreño Fiestas
Alan Carreño Fiestas - avatar
+ 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
16th Jun 2018, 3:48 AM
seamiki
seamiki - avatar