【问题标题】:NativeScript Rounded Input?NativeScript 舍入输入?
【发布时间】:2018-07-09 20:47:58
【问题描述】:

我正在尝试使用 NativeScript 和 Angular 制作一个应用程序,并希望我的文本输入框有这样的圆角:

目前是这样的:

这是我的html:

<TextField style="margin-top: 20;" class="input-rounded" hint="Email Address" keyboardType="email" returnKeyType="next" autocorrect="false" autocapitalizationType="none"></TextField>

然后这是我的 .css:

TextField {
  border-width: 1;
  border-color: white;
  background-color: white;
  height: 7%;
  width: 90%;
  margin-bottom: 20;
}

我也尝试将边框半径设置为 1rem。 谢谢!

【问题讨论】:

    标签: html css nativescript


    【解决方案1】:

    尝试仅提供border-radius 的数字

    .input-rounded {
      margin-top: 20;
      border-width: 1;
      border-color: white;
      background-color: white;
      margin-bottom: 20px;
      border-radius:10;
    }
    <TextField class="input-rounded" hint="Email Address" keyboardType="email" returnKeyType="next" autocorrect="false" autocapitalizationType="none"></TextField>

    编辑:修改了代码。删除了内联样式标签,并使用类而不是元素选择器添加了 css。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-06-19
      • 1970-01-01
      • 2011-02-24
      • 2011-12-13
      • 1970-01-01
      • 2018-12-15
      • 2021-11-05
      相关资源
      最近更新 更多