在我的页面的背景中的html5 canvas元素?

编程入门 行业动态 更新时间:2024-10-10 23:24:17
本文介绍了在我的页面的背景中的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元素?

本文发布于:2023-10-12 04:25:51,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1483717.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:元素   页面   景中   canvas

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!