.mat-tab-group {
margin: 10px;
}
.mat-tab-label-active {
width: 50px;
background: silver;
color: darkblue;
font-weight: bold;
border-top-right-radius: 5px;
margin-left: 10px;
margin-right: 10px;
opacity: 1 !important;
text-align: center;
animation: none;
}
.mat-tab-label {
text-align: center;
width: 50px;
margin-left: 10px;
margin-right: 10px;
background: silver;
color: darkblue;
font-weight: bold;
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
我正在尝试将文本宽度设置为50px(有效和无效),但标签是否还在移动?
答案 0 :(得分:1)
只需在您的src/styles.css
文件中添加以下行:
@import '~@angular/material/prebuilt-themes/deeppurple-amber.css';