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

查看:25
本文介绍了我的页面背景中的 html5 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 样式,该样式具有 position: fixed(或 absolute> 视情况而定),然后任何跟随它的内容(与您在示例中给出的容器内容相反)都应该放在它上面.

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天全站免登陆