我正在追问这个问题CSS Question
我想更改黑色或蓝色,使其看起来像这样的普通文本框.
HTML代码如下所示.
<mat-form-field class="custom-form-field" style="padding-top: 5px;padding-bottom: 0px; line-height: 0px;">
<input style="padding-top: 0px; padding-bottom: 0px;" matInput type="text" id="onSearch" (keyup)="keyUp($event)">
<mat-icon matPrefix class="centered-icon">search</mat-icon>
</mat-form-field>
我现在正在使用此代码删除文本框的粗黑色或粗蓝色边框.
.custom-form-field .mat-form-field-outline-thick,
.custom-form-field
.mat-form-field-appearance-outline.mat-focused
.mat-form-field-outline-thick {
border-color: black !important;
color: black !important;
opacity: 1 !important;
}
.custom-form-field .mat-input-element {
caret-color: black !important;
}
EDIT个
如何将框的大小缩小20%,并将搜索图标垂直对齐到文本框的中间?