HTML5 Canvas as CSS background-image? [英] HTML5 Canvas as CSS background-image?
本文介绍了HTML5 Canvas as CSS background-image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使DIV的背景图片可以用getContext(2d)修改的画布?
Is it possible to make the background image of a DIV a canvas that can be modified with getContext("2d")?
推荐答案
您可以在div中使用绝对css位置的canvas,其他元素的z-index必须大于canvas。
You can have a canvas inside the div with absolute css position, other elements have to have z-index greater than the canvas.
这篇关于HTML5 Canvas as CSS background-image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文