我正在尝试减小 mat-raised 按钮的大小。我想我可以通过减小文本的大小来减小按钮的大小。但是我做不到。
这是 CSS:
button {
margin-right: 1vw;
background: #4285F4;
color: white;
font-size: 9px;
height: auto;
width: auto;
}
和模板:
<button mat-raised-button class="button"><span>Click here to submit</span></button>
最佳答案
您走在正确的轨道上。除了字体大小,您还需要更改行高:
button{
margin-right: 1vw;
background: #4285F4;
color: white;
font-size: 9px;
line-height: 18px;
height: auto;
width: auto;
}
关于html - 调整 mat-raised-button 的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57329557/