在 IONIC-3 中隐藏离子输入验证边框 [英] Hide ion input validation border in IONIC-3

查看:17
本文介绍了在 IONIC-3 中隐藏离子输入验证边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用的是 ionic 3,我想知道如何去除验证边框颜色,红色和绿色.

Im used ionic 3 , i want to know how to remove validation border color, red and green .

我试图删除,使用这个 css

I tried to removed, using this css

.item-inner {边框底部颜色:透明!重要;盒子阴影:无!重要;}

它不起作用,该解决方案已删除每条焦点线,任何人都知道如何仅删除验证颜色

its not work, that solution is removed every focus line , any one know how to remove only validation color

推荐答案

如果你想要所有输入字段:

If you want for all input fields:

您可以覆盖以下为 Android Material Design 默认设置的 scss 变量:

You can override the following scss variables which are set by default for android material design:

$text-input-highlight-color-valid:transparent;
$text-input-highlight-color-invalid:transparent;

对于单个元素,您可以在相应的 scss 类中使用自定义类,然后为 ng-valid 设置border-bottom,使用border-bottom-color 设置ng-invalid 类.

For individual elements you can have a custom class in your corresponding scss class and then set border-bottom for ng-valid, ng-invalid classes with border-bottom-color.

.my-input.ng-invalid{
   border-bottom-color: transparent;
}
.my-input.ng-valid{
   border-bottom-color: transparent;
}

这篇关于在 IONIC-3 中隐藏离子输入验证边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆