[0]引擎示例中的错误
引擎示例-2D-DOM元素-表单输入,有1处问题
链接:https://layaair2.ldc2.layabox. ... DForm
1、constructor里的最后一行:
Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]);
当stage调整尺寸时,对3个input位置进行调整,当初次运行时,3个input框排在网页左上角,必须手动改变一下浏览器大小才会触发这个事件。
链接:https://layaair2.ldc2.layabox. ... DForm
1、constructor里的最后一行:
Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]);
当stage调整尺寸时,对3个input位置进行调整,当初次运行时,3个input框排在网页左上角,必须手动改变一下浏览器大小才会触发这个事件。
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
小高
赞同来自:
这只是一个展示DOM元素的示例,如果想初始运行位置对的话,
可以在constructor里的最后一行手动调用一次this.fitDOMElements()方法。