1、第一步:创建helloworld.js文件,并输入一下内容【注意:"ui";一定要在第一行,所有的双引号都为英文的双引号】
"ui";
ui.layout(
<vertical>
<text text="Hello World!"/>
</vertical>
);
![](https://img.haomeiwen.com/i4923945/39d843141082c896.png)
2、点击右上角的左三角形 按钮,运行效果如下图,是不是感觉很开心啊!
![](https://img.haomeiwen.com/i4923945/9679ea01a9b17baa.png)
3、将字体变大(size="20")、颜色为红色(color="#ff0000")、外边距变大(margin="50")【注:这些属性值(Hello World!、20,#ff0000、50)自己可随意更改,看看效果】
"ui";
ui.layout(
<vertical>
<text text="Hello World!" size="20" color="#ff0000" margin="50"/>
</vertical>
);
运行效果图:
![](https://img.haomeiwen.com/i4923945/3f3fb7fe2eb0b710.png)
网友评论