我有一個 ngx 分頁:
<pagination-controls
id="pagination"
(pageChange)="page = $event"
(pageBoundsCorrection)="page = $event"
[maxSize]="9"
[directionLinks]="true"
[autoHide]="true"
[responsive]="true"
previousLabel="Previous"
nextLabel="Next"
screenReaderPaginationLabel="Pagination"
screenReaderPageLabel="page"
screenReaderCurrentLabel="You're on page">
</pagination-controls>
帶有中心的東西,例如:
<div class="d-flex justify-content-center">
<my-pagination></my-pagination>
</div>
不作業,因為分頁的寬度總是頁面的 100%寬度。
我怎樣才能使分頁的寬度盡可能小并讓它負責?
uj5u.com熱心網友回復:
CSS:
.mat-paginator-container {
width: fit-content !important;
}
如果你想把它集中在任何地方,也添加這個:
.mat-paginator-outer-container {
justify-content: center !important;
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/377804.html
下一篇:媒體查詢在css中不起作用的問題
