【问题标题】:Border Radius Nativescript边界半径 Nativescript
【发布时间】:2017-10-09 16:02:18
【问题描述】:

Nativescript 支持这个属性border-radius 的声明吗?

border-radius: 10px 80px 80px 10px / 10px 150px 150px 10px;

我在 GridLayout 的 css 属性中使用此代码,但返回错误(参数过多)

还有其他方法可以达到同样的效果吗?

【问题讨论】:

  • 为每个角落单独应用一个。

标签: css nativescript angular2-nativescript


【解决方案1】:

根据 issue #77 NativeScript github,记录了角落的单个边框半径,但不会很快实现,因为他们专注于提高性能和修复错误。

因此,您只能将相同的半径应用于具有样式的所有角。

【讨论】:

    【解决方案2】:

    只是为了更新这个问题,您现在可以在 nativescript 中使用 border-radius

    设置 border-radius:0 不会删除边框半径,因为 Android 中的常规按钮都有它 - 但如果您还添加 border-width: 1 您会得到直边。

    Button {
        border-radius: 0;
        border-width: 1;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-04
      • 2018-02-27
      • 1970-01-01
      • 2021-06-21
      相关资源
      最近更新 更多