首页 > 解决方案 > Ionic/Angular 每个设备中的显示相同

问题描述

我制作了一个应用程序,但我希望它在所有设备上看起来都一样。在我的设备中,它看起来不错,但例如我朋友的手机比我的小,所以它看起来很糟糕,而且和我的不一样。我该如何解决?我的代码:

 <div *ngIf="posts">

<ion-card *ngFor="let item of posts.results;index as i" (click)="videomodal(item.id)" >


  <div >
    <ion-card-title style="font-size: 18px; margin-left: 10px; margin-top: 10px; margin-bottom: 15px; color: #7e2828;">
      <strong>{{item.title}}</strong></ion-card-title>
    <ion-card-subtitle style="font-size: 1em;">
      <ion-label style=" font-size: 1em;
       color: #696363;
       font-weight: 600;
       margin-left: 10px;">Çıkış Tarihi : {{item.release_date}} </ion-label>
      <ion-label style="margin-left: 15px;
       
       font-size: 100%;
       color: #696363;
       font-weight: 600;">Ortalama Oy

        <ion-badge style="padding:5px;" [class]="getClass(item.vote_average)"> {{item.vote_average}} </ion-badge>
      </ion-label>
    </ion-card-subtitle>

    <img style="margin-left: 5%; border-radius: 15px; margin-top: 10px;" bind-src=resim+item.poster_path
      height="300em" width="200em">
    <ion-card-content>
      <i style="font-size: 17px; color: #211c1c;"> {{item.overview}} </i>
    </ion-card-content>
  </div>

</ion-card>

这是我想在每部手机中查看的方式:https ://prnt.sc/12mlarb

它在小型设备中的外观:https ://prnt.sc/12mlg6i

标签: angularionic-framework

解决方案


推荐阅读