角度材质无法应用边框半径 = 0

问题描述 投票:0回答:1

这就是现在的样子。

我想删除底部半径。我尝试了几种不同的 CSS 更改,但没有成功。

forms.scss

.mdc-notched-outline__leading, .mdc-notched-outline__notch, .mdc-notched-outline__trailing {
    border-top: none;
    border-right: none;
    border-left: none;
    border-color: black;
    border-radius: 0;
}

/*  .mdc-text-field--outlined mdc-text-field--no-label {
    border-radius: 0;
}*/
/*  .mdc-notched-outline__trailing {
    border-bottom-right-radius: !important 0;
}

.mdc-notched-outline__leading {
    border-bottom-left-radius: !important 0;
}*/
/*  .mdc-notched-outline__leading{
    border-bottom-left-radius: !important 0px;
}*/

HTML

<div>
    <!-- Pagination -->
    <mat-paginator class="no-wrap"
        *ngIf="isPageable"
        [pageSizeOptions]="paginationSizes"
        [pageSize]="defaultPageSize"
        showFirstLastButtons>
    </mat-paginator>
</div>

角度材质 v17

angular angular-material
1个回答
0
投票

我不知道这是否仍然适用于新的 Angular 版本,但请尝试使用。

详细信息,Angular 无法识别组件范围之外的 Angular 材质的类别。

:host::ng-deep .className {
 border-radius : none ;
}
© www.soinside.com 2019 - 2024. All rights reserved.