Element menupulate in ionic 2

#1

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)"> 
        <ion-card-title>
            {{class.classTitle}}
        </ion-card-title>
    </ion-card>

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) {
        console.log(err);
    }
}

Please help me.

Thank you