本文介绍了在我的页面的背景中的html5 canvas元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有可能在网页背景中拥有全屏幕canvas元素,而在其前面有一个正常标记元素?
Is it possible to have a full screen canvas element in the background of a webpage and "normal" markup elements like a table in front of it?
以下代码段(如果它不会用作替代内容):
like the following snippet (if it wouldn't be used as alternative content):
<canvas id="imageView" width="100%" height="100%"> <table>...</table> </canvas>推荐答案
您可以尝试在画布上设置CSS样式它具有位置:固定(或适当地,绝对),然后 strong>它(而不是像你在你的例子中给出的容器内容)应该坐在它的顶部。
You could try setting a CSS style on the canvas where it has a position: fixed (or absolute as appropriate), and then any content that follows it (as opposed to container content as you've given in your example) should sit on top of it.
更多推荐
在我的页面的背景中的html5 canvas元素?
发布评论