내가 물어보고 싶어하지 않았기 때문에 지금 약 3 시간 동안 검색하고 검색했는데 바닥에 고정 된 '바닥 글'변수는 어떻게 유지할 수 있습니까? 내가 갖고있는 콘텐츠가 아주 작 으면 페이지 중간에 앉아있을 필요가 없지만 많은 정보가 있으면 페이지 맨 아래에서 잠그고 데이터 위에 놓아두면됩니다.Sticky footer in Angular 2 재질
그 방법은 다음을 포함합니다 : https://david-kerwick.github.io/2017/01/14/material-2-flex-layout-making-a-sticky-footer.html 그리고이 테스트와 관련된 대부분의 질문은 테스트되거나 실패하거나 전혀 작동하지 않습니다.
Heres는 내 현재 코드 : 네비게이션 바에는 fullpage sidenav을 제어하기 때문에
<div class="content">
<app-navbar></app-navbar>
<app-footer></app-footer>
</div>
과 <app-content></app-content>
는 네비게이션 바 내에 있습니다.
<mat-sidenav-container fullscreen>
<mat-sidenav mode="push" #sidenav>
<div fxLayout="column">
<mat-toolbar fxLayoutAlign="center center" color="primary">
<button mat-icon-button routerLink="/home" (click)="sidenav.close()">
<mat-icon>keyboard_backspace</mat-icon>
</button>
</mat-toolbar>
<button mat-button routerLink="/dashboard" (click)="sidenav.close()" >Information</button>
<button mat-button routerLink="/second" (click)="sidenav.close()" >Web tools</button>
</div>
</mat-sidenav>
<mat-toolbar color="primary" class="fixed-navbar mat-elevation-z10">
<button mat-icon-button (click)="sidenav.open()" fxHide="false" fxHide.gt-xs>
<mat-icon>menu</mat-icon>
</button>
<div fxLayout="row">
<button fxLayout="flex-shrink: 0;" mat-button class="title" style="font-size: 25px;">{{this.title}}</button>
<button fxShow="false" fxShow.gt-xs mat-button routerLink="/dashboard" [matMenuTriggerFor]="infoMenu">Information</button>
<button fxShow="false" fxShow.gt-xs mat-button routerLink="/second" [matMenuTriggerFor]="toolsMenu">Web tools</button>
</div>
<!-- fxFlex will fill the empty space and push the following items to the right -->
<div fxFlex></div>
<button mat-icon-button>
<mat-icon>face</mat-icon>
</button>
</mat-toolbar>
<app-container></app-container>
</mat-sidenav-container>
을 그리고 글은 다음과 같습니다 단지 슈퍼 기본 componenet입니다 :
전체 앱 메뉴 바는 다음과 같습니다
<mat-toolbar>
<div class="container">
<span>this is a toolbar</span>
</div>
</mat-toolbar>
만의 스타일 필자가 지금까지 적용
이 있습니다 :@import url('https://fonts.googleapis.com/css?family=Comfortaa');
.title {
font-family: "Comfortaa";
}
html, body {
height: 100%;
margin: 0;
}
.content {
min-height: 100%;
}
글로벌 style.css 파일에 있습니다.
sidenav 예제가있는 공식 고정 머리글/바닥 글에서도 동일한 문제가 있음을주의해야합니다. 그것은 단지 불가능할 수도 있습니다. 우리는 물질에 대한 더 많은 업데이트를 기다려야 할 것입니다. – Cacoon