How to put p5 canvas into our div background?

走远了吗. 提交于 2019-12-25 08:58:11

问题


I would like to put p5js canvas in my divisions background. How to do that? I know how to put canvas in div but don't know how to put in background.


回答1:


This isn't really a P5.js question. It's more a general HTML and CSS question. I recommend googling something like html use canvas as background of div for a ton of results, including:

  • Use <canvas> as a CSS background
  • Set canvas element as background of a div element
  • An html5 canvas element in the background of my page?
  • Set HTML Canvas as page background

Taking a step back, it's worth noting that Stack Overflow isn't really designed for general "how do I do this" type questions. It's for more specific "I tried X, expected Y, but got Z instead" type questions. So you should really try to do some research and write some code and then post a MCVE if you get stuck. Good luck.



来源:https://stackoverflow.com/questions/46874608/how-to-put-p5-canvas-into-our-div-background

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!