我正在使用 NativeScript StackLayout 组件来布局我的元素。
在 StackLayout 的子元素之间创建间隙的最佳方法是什么?
您可以margin在 css 中使用该布局。
在你的 XML 中:
<StackLayout>
<Label text="Hey there,"></Label>
<Label text="world!"></Label>
</StackLayout>
Run Code Online (Sandbox Code Playgroud)
在你的 css 中:
StackLayout Label {
margin: 10;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2443 次 |
| 最近记录: |