美文网首页
Hello World!

Hello World!

作者: jdallen | 来源:发表于2018-12-06 23:46 被阅读0次

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

相关文章

网友评论

      本文标题:Hello World!

      本文链接:https://www.haomeiwen.com/subject/eexzcqtx.html