我正在使用角度。我有一个图像轮播。我有两个网格布局,一个在另一个之上。顶部的网格具有导航按钮。我希望它们位于图像顶部到底部的中心。我正在尝试根据图像高度执行此操作,因为它会根据设备大小而有所不同。如何获取视图图像的高度或包含网格的高度?
<GridLayout class="template_body" rows="auto,50*,auto" columns="*" #sv>
<GridLayout row="0" #wviWrapper>
<!-- <web-view id="wvi" #wvi></web-view> -->
<template-text *ngIf="lessonDetail.instruction" [data]="lessonDetail.instruction" [version]="version" [screenwidth]="screenWidth"></template-text>
</GridLayout>
<GridLayout row="1">
<player-carousel [data]='lessondata' [itemindex]="lessonindex" (loaded)="onCarouselLoaded($event)" [clength]="carouselLength"></player-carousel>
</GridLayout>
<GridLayout row="1">
<FlexboxLayout backgroundColor="#3c495e" alignItems="center" justifyContent="space-between" verticalAlignment="top" orientation="horizontal" class="button-group" #bg>
<Button text="" appDebounceTap (debounceClick)="getItem(-1)" [debounceTime]="1000" id="backbtn" col="0" alignSelf="flex-end" class="back-btn fas" horizontalAlignment="left"></Button>
<Button text="" appDebounceTap (debounceClick)="getItem(1)" [debounceTime]="1000" id="nextbtn" col="1" alignSelf="flex-end" class="next-btn fas" horizontalAlignment="right"></Button>
</FlexboxLayout>
</GridLayout>
</GridLayout>
我正在使用角度: