你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
Laya_XS
赞同来自: layabox
177*****621
赞同来自: Laya_XS
赞同来自:
要回复问题请先登录
3 个回复
Laya_XS
赞同来自: layabox
Laya.stage.bgColor = "none";如果bgColor 设置成none,舞台颜色(html中body标签的颜色)会变成默认的黑色,目前引擎是这样设置的。
177*****621
赞同来自: Laya_XS
177*****621
赞同来自:
onStart() {
console.log("Game start");
Laya.Config.isAlpha = true;
Laya.stage.bgColor ="none";
this.Show();
}
private iframe: any = Laya.Browser.document.createElement("iframe");
private _view: HTMLDivElement = document.createElement("div");
public Show(): void {
Laya.Browser.document.body.appendChild(this._view);
this._view.appendChild(this.iframe);
this.iframe.src = "https://www.layabox.com/";
this.iframe.style.position = "fixed";
this.iframe.style.top = "0";
this.iframe.style.bottom = "0";
this.iframe.style.left = "0";
this.iframe.style.right = "0";
this.iframe.style.width = "100%";
this.iframe.style.height = "100%"
this.iframe.style.border = "none";
this.iframe.style.zIndex=-1
}
那我有一个需求,想将document 元素 层级设置为-1,任看得见,该如何实现呢