【发布时间】:2021-02-03 06:11:47
【问题描述】:
我在带有多个过滤器的过滤器栏中有一个应用按钮,有时此应用按钮将显示在下一行,而不是与其他过滤器显示在同一行中。我如何识别此 的位置应用按钮以识别它在 html 页面中的显示位置。
<div class="filter-container">
<button (click)="apply() "
[ngClass]="{'a-btn--disabled': isDisable}" id ="apply"
mat-raised-button >Apply
</button>
</div>
应用按钮和其他过滤器在这个<div class="filter-container">中。这是我的组件代码。
const fpH = $('.apply').positionY;
console.log(fpH);
但是console.log(fpH); 打印为undefined。我尝试使用paddingRight,但它也显示为undefined
我能做些什么
【问题讨论】:
标签: html css angular button position