2016-10-04 52 views
0

是否可以在nativescript中只设置按钮的两个圆角?我不确定是否将半径指定为css属性会起作用,因为圆角四舍五入所有四个角,而我似乎无法在剪辑路径中找到半圆或半椭圆。仅设置nativescript中按钮的两个圆角

回答

0

目前,NativeScript仅支持统一的边界半径。您可以尝试设置多边形剪辑路径。这里是一个多边形夹路径剪辑明星的例子:

<Button text="polygon" style="background-color: magenta; border-width:2; border-color: red; clip-path: polygon(20% 0%, 0% 20%, 30% 50%, 0% 80%, 20% 100%, 50% 70%, 80% 100%, 100% 80%, 70% 50%, 100% 20%, 80% 0%, 50% 30%);" row="3" /> 

This可以帮助你与剪辑路径四舍五入的角落。

+0

nativescript支持剪辑路径样式?酷... –

+0

检查出: https://github.com/NativeScript/NativeScript/pull/2102 – jcgarciam

0

我需要的东西就像一个聊天气泡,所以我裹般stacklayout-容器内的圆形标签,并设置左/右页边距关集装箱。