【发布时间】:2017-07-28 06:56:58
【问题描述】:
我正在使用 NativeScript StackLayout 组件来布局我的元素。
在 StackLayout 的子元素之间创建间隙的最佳方法是什么?
【问题讨论】:
标签: nativescript
我正在使用 NativeScript StackLayout 组件来布局我的元素。
在 StackLayout 的子元素之间创建间隙的最佳方法是什么?
【问题讨论】:
标签: nativescript
您可以在该布局的 css 中使用 margin。
在你的 XML 中:
<StackLayout>
<Label text="Hey there,"></Label>
<Label text="world!"></Label>
</StackLayout>
在你的 CSS 中:
StackLayout Label {
margin: 10;
}
【讨论】: