Angular材质的Mat-button-toggle-group与动画配合使用吗?

时间:2019-04-06 11:17:38

标签: html css angular-material

我有一个mat-button-toggle-group,如下面的代码所示:

<mat-button-toggle-group name="fontStyle" aria-label="Font Style">
  <mat-button-toggle value="bold">Bold</mat-button-toggle>
  <mat-button-toggle value="italic">Italic</mat-button-toggle>
  <mat-button-toggle value="underline">Underline</mat-button-toggle>
</mat-button-toggle-group>

我使用此CSS为组设置样式。

 .mat-button-toggle-group {
   background-image: url('display.png');
   background-repeat: repeat-x;
   border-radius: 16px;

  }
  .mat-button-toggle {
    background-color: transparent;
  }

  .mat-button-toggle-checked {
    background-color: #1a7375; 
    border-radius: 32px;
   }

是否有机会在按钮之间进行过渡或自定义动画?例如,如果选中了“粗体”按钮,然后单击“下划线”按钮,则我希望在这两个按钮之间进行幻灯片动画处理-像是一个从“粗体”按钮拉到“下划线”按钮的滑块,并且该滑块在点击“下划线”按钮之前也要通过斜体按钮

0 个答案:

没有答案
相关问题