我在我的项目中使用自动完成组件,我在组件中添加了搜索图标作为后缀,如下图所示
我试图将图标和自动完成组件的输入字段对齐在同一行上。
我无法做到这一点。这是分叉的stackblitz链接。
使用css:
mat-icon{ position: relative; top: 7px; }
见这里:https://stackblitz.com/edit/angular-9ao75y-wtqj1n?file=app/autocomplete-filter-example.css