Babylon background + HTML

Dear babylon community,

How easy or hard is it to have a babylon 3D scene as website background, and then have a normal html/bootstrap website on top of it? I suppose I cannot just put the code in the canvas element? How to approach this?

Thanks in advance!

The canvas is just one of the DOM elements, so one can make with it everything what is possible to do.
One can put the canvas to the background and use text and buttons over it; or use background image behind transparent canvas.
You may find some examples at https://babylonpress.org/

1 Like

Thanks! So as long as I draw the canvas and put:
canvas { width:100%;height:100%}
as style, it will fill the space and I can just put anything on it? Also when using bootstrap or React?

Actually it doesn’t matter; the most important thing is the final HTML.