[]as hello world 背景还是黑色
as hello world
package {
import laya.ui.Label;
public class LayaSample {
public function LayaSample() {
//初始化引擎
Laya.init(1136, 640);
Laya.stage.bgColor = "#ffffff";
var sp : Label = new Label("hello world");
//sp.fontSize = 55;
sp.pos(100, 100) ;
//sp.color = "#000000";
Laya.stage.addChild(sp);
}
}
}
chrome 下查看源代码
<html>
<head>
<meta charset='utf-8'/>
<title>www.layabox.com</title>
<meta name='renderer' content='webkit'>
<meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='full-screen' content='true' />
<meta name='x5-fullscreen' content='true' />
<meta name='360-fullscreen' content='true' />
<meta http-equiv='expires' content='0' />
<meta name='laya' screenorientation='landscape' />
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta http-equiv='expires' content='0' />
<meta http-equiv='Cache-Control' content='no-siteapp' />
</head>
<body style='margin:0;overflow:none;overflow-x:hidden;overflow-y:hidden;background-color: #000;'>
<script src='LayaSample.max.js' loader='laya'></script>
</body>
</html>
背景没有赋值成黑色
package {
import laya.ui.Label;
public class LayaSample {
public function LayaSample() {
//初始化引擎
Laya.init(1136, 640);
Laya.stage.bgColor = "#ffffff";
var sp : Label = new Label("hello world");
//sp.fontSize = 55;
sp.pos(100, 100) ;
//sp.color = "#000000";
Laya.stage.addChild(sp);
}
}
}
chrome 下查看源代码
<html>
<head>
<meta charset='utf-8'/>
<title>www.layabox.com</title>
<meta name='renderer' content='webkit'>
<meta name='viewport' content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'/>
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='full-screen' content='true' />
<meta name='x5-fullscreen' content='true' />
<meta name='360-fullscreen' content='true' />
<meta http-equiv='expires' content='0' />
<meta name='laya' screenorientation='landscape' />
<meta http-equiv='X-UA-Compatible' content='IE=edge,chrome=1'>
<meta http-equiv='expires' content='0' />
<meta http-equiv='Cache-Control' content='no-siteapp' />
</head>
<body style='margin:0;overflow:none;overflow-x:hidden;overflow-y:hidden;background-color: #000;'>
<script src='LayaSample.max.js' loader='laya'></script>
</body>
</html>
背景没有赋值成黑色
没有找到相关结果
已邀请:
3 个回复
mingchaoyan
赞同来自:
感谢梦佳老师远程指导
mingchaoyan
赞同来自:
Monica - 知识达人
赞同来自: