Is it possible to have an HTML canvas element in the background of my page?

JavascriptWeb DevelopmentFront End Scripts

Yes, try to set the CSS style with position: fixed (or absolute):

canvas{
   position:absolute;
   left:0;
   top:0;
   z-index:-1;
}

You can also set it to the following:

<style>
   #canvasSection{
      position:fixed;
   }
</style>
raja
Published on 05-Apr-2018 13:54:21
Advertisements