【问题标题】:How to remove hover color from mat radio button in angular?如何从角度的垫单选按钮中删除悬停颜色?
【发布时间】:2021-12-05 19:11:58
【问题描述】:

我正在做一个项目。从垫子单选按钮中删除悬停颜色是项目的要求。我尝试了很多东西,但对我没有任何效果。我目前的样式如下:

::ng-deep .mat-radio-button.mat-accent .mat-radio-ripple .mat-ripple-element {
  opacity: 0.5 !important;     /*click effect color change*/
  background-color: transparent !important;
}

::ng-deep .mat-radio-button.mat-accent .mat-radio-inner-circle {
  background-color: blue !important;   /*inner circle color change*/
}

::ng-deep.mat-radio-button.mat-accent.mat-radio-checked .mat- 
radio-outer-circle {
  border-color:blue !important; /*outer ring color change*/
}

我花了很多时间。如果有人知道谁来解决它,请告诉我。谢谢

【问题讨论】:

    标签: angular angular-material radio-button hover


    【解决方案1】:

    基本上,您想消除涟漪效应。要消除 mat 单选按钮上的涟漪效应,您可以这样做:

    .mat-radio-ripple {
        display: none;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-03-07
      • 1970-01-01
      • 2020-01-21
      • 1970-01-01
      • 1970-01-01
      • 2019-01-23
      • 2017-11-29
      相关资源
      最近更新 更多