UI 元素的 NativeScript 边框半径不起作用
NativeScript border-radius for UI element is not working
我正在使用 VS telerik 扩展来开发我的移动应用程序。但是,我试图通过使用 CSS border-radius:3px-52px 来弯曲我的 UI 元素的边界,但它不起作用。我已经使用了几种方法来解决它,但实际上并没有奏效。我认为这是 VS telerik 扩展的错误。
不要在 border-radius 值中使用 px
。只需使用一个数值。
通过向图像添加 class 然后删除 px 它应该可以工作。
示例
.avatar{
background-color: #ffffff;
border-radius: 150;
width: 100
}
<Image src="https://pbs.twimg.com/profile_images/677158239851646976/l-mkCSMK.jpg" class="avatar"></Image>
我正在使用 VS telerik 扩展来开发我的移动应用程序。但是,我试图通过使用 CSS border-radius:3px-52px 来弯曲我的 UI 元素的边界,但它不起作用。我已经使用了几种方法来解决它,但实际上并没有奏效。我认为这是 VS telerik 扩展的错误。
不要在 border-radius 值中使用 px
。只需使用一个数值。
通过向图像添加 class 然后删除 px 它应该可以工作。
示例
.avatar{
background-color: #ffffff;
border-radius: 150;
width: 100
}
<Image src="https://pbs.twimg.com/profile_images/677158239851646976/l-mkCSMK.jpg" class="avatar"></Image>