我怎样才能让这两个项目正确对齐?我试图让它们完全对齐,但调整按钮高度只会使底部远离搜索输入的底部。我认为这是因为它们的中心没有对齐,所以调整高度并不是真正的正确解决方案。
这是HTML
<!-- Search Box and Button-->
<p>Search by company name:</p>
<mat-form-field appearance="outline">
<mat-label>Search</mat-label>
<input matInput placeholder="Search">
</mat-form-field>
<button mat-stroked-button color="primary">Search</button>
这是 SCSS:
mat-form-field.mat-form-field {
font-size: 12px;
width: 300px;
}
button.mat-stroked-button {
font-size: 14px;
height: 42px;
margin: 10px;
}