Angular 提前输入ngx引导的位置

Angular 提前输入ngx引导的位置,angular,ngx-bootstrap,typehead,Angular,Ngx Bootstrap,Typehead,我有来自ngx bootstrap的typeahead,我想找到它,以便typeahead下拉列表位于输入的中心 我的意思是这样的 谢谢 在ng引导中似乎无法更改 所以我使用CSS来覆盖它,但是使用它时要小心,以免有太多的!重要信息语法 app.component.css // :host => only work in app.component.css // :host ::ng-deep => look for selector `typeahead-container.d

我有来自
ngx bootstrap
typeahead
,我想找到它,以便typeahead下拉列表位于输入的中心

我的意思是这样的

谢谢

在ng引导中似乎无法更改

所以我使用CSS来覆盖它,但是使用它时要小心,以免有太多的
!重要信息
语法

app.component.css

// :host => only work in app.component.css
// :host ::ng-deep => look for selector `typeahead-container.dropdown-menu` in `app.component.css`
:host ::ng-deep typeahead-container.dropdown-menu {
    left: 50%!important;
    transform: translateX(-50%);
}

/*
// it will be compiled to this
[_nghost-c0] typeahead-container.dropdown-menu {
    left: 50%!important;
    transform: translateX(-50%);
}
*/
在ng引导中似乎无法更改

所以我使用CSS来覆盖它,但是使用它时要小心,以免有太多的
!重要信息
语法

app.component.css

// :host => only work in app.component.css
// :host ::ng-deep => look for selector `typeahead-container.dropdown-menu` in `app.component.css`
:host ::ng-deep typeahead-container.dropdown-menu {
    left: 50%!important;
    transform: translateX(-50%);
}

/*
// it will be compiled to this
[_nghost-c0] typeahead-container.dropdown-menu {
    left: 50%!important;
    transform: translateX(-50%);
}
*/
你说的提前输入下拉列表的意思是在我输入的中心。我的意思是这样的。你说的提前输入下拉列表的意思是在我输入的中心。我的意思是这样的