[LayaAir 2.0]laya生成的layaContainer div想用appendChild方法添加到某div下,但是针对sprite距离位置并没有变化

  showModal() {
    
    Laya.init(800, 500, WebGL);
   
    Laya.stage.bgColor = "#ffffff";
    console.log(Laya.Render._mainCanvas);
    Laya.Render._mainCanvas.source.style.top = "50px";
   
    this.setup();
    const parent = document.getElementById("preview");
    const child = document.getElementById("layaContainer");
  
    parent.appendChild(child);
    console.log(this.rect); 
  }
已邀请:

要回复问题请先

商务合作
商务合作