fixed to the top button

This commit is contained in:
VLE2FE 2020-08-25 09:01:45 +02:00
parent 141064b38d
commit 3e53ef874c
3 changed files with 9 additions and 20 deletions

View File

@ -53,15 +53,12 @@
</div>
</rb-full-header>
<div class="to-the-top-container">
<div class="container">
<router-outlet></router-outlet>
</div>
<div class="to-the-top">
<rb-icon-button icon="up" mode="primary" iconOnly (click)="toTheTop()"></rb-icon-button>
</div>
</div>
<rb-icon-button icon="up" mode="primary" iconOnly (click)="toTheTop()" *ngIf="window.scrollY > 300" class="to-the-top">
</rb-icon-button>
<rb-footer-nav>
<span class="copyright">

View File

@ -14,21 +14,13 @@
width: 800px;
}
.to-the-top-container {
.container {
position: relative;
overflow: hidden;
}
.to-the-top {
position: absolute;
top: 100vh;
bottom: 10px;
position: fixed;
right: 1rem;
pointer-events: none;
rb-icon-button {
position: sticky;
pointer-events: all;
top: calc(100vh - 3rem);
}
bottom: 20px;
}

View File

@ -22,7 +22,7 @@ export class AppComponent implements OnInit{
constructor(
public login: LoginService,
public router: Router,
private window: Window,
public window: Window,
private modal: ModalService,
public d: DataService
) {