[英]Can you put one canvas inside another canvas?
basically, i have 2 javascripts(easelJS with add scripting) that run on 2 different canvas elements in my html index file. 基本上,我有2个javascript(带有添加脚本的easelJS)在html索引文件中的2个不同的canvas元素上运行。
i was wonder, if i can sort of "wrap" those two inside a main canvas element, and thus have more power to play with their layout opposed to one another, rather than relying on html/css positioning. 我想知道,是否可以将这两个“包装”在一个主canvas元素中,从而有更多的功能来处理彼此相对的布局,而不是依靠html / css定位。
Is it possible? 可能吗?
Thanks! 谢谢!
Nesting canvas
inside another canvas
is possible. 可以将
canvas
嵌套在另一个canvas
中。 Say something like this: 说像这样:
<canvas id="outer">
<canvas id="inner"></canvas>
</canvas>
Not sure if this answers your question, but you can refer Canvas inside canvas of html5 for more information. 不知道这是否能回答您的问题,但是您可以在html5的画布内引用Canvas以获得更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.