• <i id='GlEXM'><tr id='GlEXM'><dt id='GlEXM'><q id='GlEXM'><span id='GlEXM'><b id='GlEXM'><form id='GlEXM'><ins id='GlEXM'></ins><ul id='GlEXM'></ul><sub id='GlEXM'></sub></form><legend id='GlEXM'></legend><bdo id='GlEXM'><pre id='GlEXM'><center id='GlEXM'></center></pre></bdo></b><th id='GlEXM'></th></span></q></dt></tr></i><div id='GlEXM'><tfoot id='GlEXM'></tfoot><dl id='GlEXM'><fieldset id='GlEXM'></fieldset></dl></div>

    <small id='GlEXM'></small><noframes id='GlEXM'>

        <bdo id='GlEXM'></bdo><ul id='GlEXM'></ul>

        <tfoot id='GlEXM'></tfoot>
      1. <legend id='GlEXM'><style id='GlEXM'><dir id='GlEXM'><q id='GlEXM'></q></dir></style></legend>

        如何删除输入类型中的默认颜色?

        时间:2023-09-08

        <small id='SbQsN'></small><noframes id='SbQsN'>

          <tfoot id='SbQsN'></tfoot>

              • <i id='SbQsN'><tr id='SbQsN'><dt id='SbQsN'><q id='SbQsN'><span id='SbQsN'><b id='SbQsN'><form id='SbQsN'><ins id='SbQsN'></ins><ul id='SbQsN'></ul><sub id='SbQsN'></sub></form><legend id='SbQsN'></legend><bdo id='SbQsN'><pre id='SbQsN'><center id='SbQsN'></center></pre></bdo></b><th id='SbQsN'></th></span></q></dt></tr></i><div id='SbQsN'><tfoot id='SbQsN'></tfoot><dl id='SbQsN'><fieldset id='SbQsN'></fieldset></dl></div>
                  <bdo id='SbQsN'></bdo><ul id='SbQsN'></ul>
                    <tbody id='SbQsN'></tbody>
                  <legend id='SbQsN'><style id='SbQsN'><dir id='SbQsN'><q id='SbQsN'></q></dir></style></legend>
                  本文介绍了如何删除输入类型中的默认颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我已经创建了输入类型并为该框创建了边框,但是当我单击该按钮时,它显示的是默认颜色,但我不应该显示默认颜色下面是显示的图像:

                  I had created the input type and created the border the border for that box,but when i had clicked in that button it is displaying the default color but i should not display the default color Below is the displayed image:

                  下面是我的html代码:

                  Below is my html code:

                  <ion-item  class="Credit">
                  <ion-input type="number"
                              placeholder="Credit Card number"
                              class="form-control"></ion-input>
                  </ion-item>
                  

                  下面是我的css代码:

                  Below is my css code:

                  .Credit{  
                          top: 20px;
                           border-radius: 10px;
                           width: 350px;
                           display: block;
                           margin-left: auto;
                           margin-right: auto;
                          background: url(../assets/images/credit_card.png);
                          background-position:right;
                          background-size: 45px;
                          background-repeat:no-repeat;
                          border:1px solid #DADADA;
                          margin-bottom: 10px;
                  
                  
                  }
                  

                  推荐答案

                  你可以尝试重写Ionic的样式规则,因为输入有效或无效时也会发生同样的情况:

                  You can try by overriding Ionic's style rules, because the same will also happen when the input is valid or invalid:

                  /* Workaround to hide android default validation colors */
                  ion-item.item-md.item-input.input-has-focus .item-inner,
                  ion-item.item-md.item-input.ng-valid.input-has-value:not(.input-has-focus) .item-inner,
                  ion-item.item-md.item-input.ng-invalid.ng-touched:not(.input-has-focus) .item-inner {
                      border-bottom-color: #dadada;
                      box-shadow: none;
                  }
                  
                  /* Workaround to hide window phone default validation colors */
                  ion-item.item-wp.item-input.input-has-focus .text-input,
                  ion-item.item-wp.item-input.ng-valid.input-has-value:not(.input-has-focus) .text-input,
                  ion-item.item-wp.item-input.ng-invalid.ng-touched:not(.input-has-focus) .text-input {
                      border: 2px solid #dadada;
                  }
                  

                  更新

                  解决这个问题的更离子方式是在 variables.scss 文件中添加以下内容:

                  A more Ionic way to solve this, would be by adding the following in the variables.scss file:

                  // Ionic variables override
                  $text-input-ios-show-focus-highlight: false;
                  $text-input-md-show-focus-highlight: false;
                  $text-input-wp-show-focus-highlight: false;
                  

                  这篇关于如何删除输入类型中的默认颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:如何将点击事件添加到打字稿中动态添加的html元 下一篇:Ionic - Google 地方和自动填充位置

                  相关文章

                  最新文章

                • <i id='jZZ2w'><tr id='jZZ2w'><dt id='jZZ2w'><q id='jZZ2w'><span id='jZZ2w'><b id='jZZ2w'><form id='jZZ2w'><ins id='jZZ2w'></ins><ul id='jZZ2w'></ul><sub id='jZZ2w'></sub></form><legend id='jZZ2w'></legend><bdo id='jZZ2w'><pre id='jZZ2w'><center id='jZZ2w'></center></pre></bdo></b><th id='jZZ2w'></th></span></q></dt></tr></i><div id='jZZ2w'><tfoot id='jZZ2w'></tfoot><dl id='jZZ2w'><fieldset id='jZZ2w'></fieldset></dl></div>
                  • <bdo id='jZZ2w'></bdo><ul id='jZZ2w'></ul>
                  <tfoot id='jZZ2w'></tfoot>
                  <legend id='jZZ2w'><style id='jZZ2w'><dir id='jZZ2w'><q id='jZZ2w'></q></dir></style></legend>
                • <small id='jZZ2w'></small><noframes id='jZZ2w'>