【发布时间】:2017-10-26 02:53:01
【问题描述】:
我是 nativescript 的新手。我不知道如何为 stacklayout 提供边框和边框半径。
下面我发布了到目前为止我尝试过的内容:
component.html:
<StackLayout class ="stackBorder" orientation="horizontal">
<Label text="Label 1" width="50" height="50" > </Label>
<Label text="Label 2" width="50" height="50" > </Label>
<Label text="Label 3" width="50" height="50" backgroundColor="white"> </Label>
<Label text="Label 4" width="50" height="50" backgroundColor="white"> </Label>
</StackLayout>
component.css:
StackLayout {
margin: 10;
background-color: green;
}
.stackBorder {
border: 2px solid red;
border-radius: 8px;
}
component.ts:
@Component({
selector: "sdk-child-component",
moduleId: module.id,
templateUrl: "./component.html",
styleUrls: ["./component.css"]
})
最后我在 stacklayout 中看不到边框。
【问题讨论】:
标签: css typescript nativescript angular2-nativescript