【发布时间】:2018-10-23 01:02:31
【问题描述】:
这是 Sidenav 的 Angular Material 中使用的代码示例。我在我的页面上使用了同样的例子。但是,我可以找到任何说明如何从屏幕右侧从左到右打开侧导航。有人知道怎么做吗?
<mat-sidenav-container class="example-container">
<mat-sidenav #sidenav mode="side" [(opened)]="opened" (opened)="events.push('open!')"
(closed)="events.push('close!')">
Sidenav content
</mat-sidenav>
<mat-sidenav-content>
<p><mat-checkbox [(ngModel)]="opened">sidenav.opened</mat-checkbox></p>
<p><button mat-button (click)="sidenav.toggle()">sidenav.toggle()</button></p>
<p>Events:</p>
<div class="example-events">
<div *ngFor="let e of events">{{e}}</div>
</div>
</mat-sidenav-content>
</mat-sidenav-container>
【问题讨论】:
-
你有检查 css。在
css 中查找“left: some value px;”值。然后把它改成“right: some value px;” -
也许您的意思是找不到说明?
标签: html css typescript angular-material angular6