在我的页面的背景中的html5 canvas元素? [英] An html5 canvas element in the background of my page?

查看:110
本文介绍了在我的页面的背景中的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元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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