Hello World!

2018-12-06  本文已影响0人  jdallen

1、第一步:创建helloworld.js文件,并输入一下内容【注意:"ui";一定要在第一行,所有的双引号都为英文的双引号】

"ui";
ui.layout(
<vertical>
<text text="Hello World!"/>
</vertical>
);
image.png

2、点击右上角的左三角形 按钮,运行效果如下图,是不是感觉很开心啊!

image.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>
);

运行效果图:


image.png
上一篇 下一篇

猜你喜欢

热点阅读