如何将p5 canvas放入我们的div背景? [英] How to put p5 canvas into our div background?

查看:248
本文介绍了如何将p5 canvas放入我们的div背景?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将p5js画布放在我的部门背景中.怎么做?我知道如何在div中放置画布,但不知道如何在背景中放置.

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.

推荐答案

这实际上不是P5.js问题.这是一个更常见的HTML和CSS问题.我建议使用类似 html的背景使用画布作为背景div 获取大量结果,

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

退后一步,值得注意的是,Stack Overflow并不是真正针对一般的我该怎么做"类型的问题而设计的.这是针对更具体的我尝试过X,期望是Y,但是却改为Z"类型的问题.因此,您应该尝试进行一些研究并编写一些代码,然后在获得 MCVE 的情况下发布卡住.祝你好运.

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.

这篇关于如何将p5 canvas放入我们的div背景?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆