Element menupulate in ionic 2

I have created a list and want to reposition of each list by dynamically assign top CSS parameter in each list please help me out

    <ion-card *ngFor="let class of classes" class="eventCard" (tap)="loadChepterList($event, class)"> 

let eventElements = this.elem.nativeElement.querySelectorAll(’.eventCard’);

for (let i = 0; i < this.classes.length; i++) {
    try {
        timeElements[i].offsetTop = newPosition;  //its rendomly changes
    } catch (err) {

Please help me.

Thank you