Nested CANVAS elements

后端 未结 4 1091
孤街浪徒
孤街浪徒 2021-01-17 12:14

Is it possible to have a element within another element? I know i can layer them, but is this possible -


    

        
4条回答
  •  粉色の甜心
    2021-01-17 13:02

    You can, as Isaac Zepeda said in his answer, you need to have different canvas id's and z indexes. You also need to name almost all of the variables and functions for each canvas something different so that you don't draw on canvas A when you mean to draw on canvas B.

提交回复
热议问题