【问题标题】:Change bottom border styling on mat-autocomplete [closed]在垫子自动完成上更改底部边框样式[关闭]
【发布时间】:2021-07-03 13:25:17
【问题描述】:

我浏览了几个链接,但找不到解决方案。这是demo code

我想删除紫色并用红色替换它,但我做不到。请帮忙。

【问题讨论】:

    标签: html css angular sass angular-material


    【解决方案1】:

    试试下面的样式:

    autocomplete-filter-example {
      input[type="text"] {
        border-bottom: 1px solid black;
      }
      input[type="text"]:focus {
        border-bottom: 1px solid red !important;
      }
      .mat-form-field-underline {
        display: none;
      }
    }
    
    

    Demo code

    【讨论】:

      【解决方案2】:

      可以像这样覆盖类:

      .mat-form-field.mat-focused {        
          .mat-form-field-ripple {
              background-color: red;
          }
      }
      

      The complete stackblitz example can be seen here

      【讨论】:

        猜你喜欢
        • 2018-08-19
        • 2019-08-15
        • 2020-04-19
        • 2020-05-27
        • 2017-01-04
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多