angular - 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
解决方案
推荐阅读
- python - 数据框使用新名称创建新列
- asp.net - 文件输入未定义
- android-fragments - 将值从一个片段传递到另一个片段时遇到问题
- xml - 在scala中访问xml的所有元素
- gremlin - 在 Gremlin 查询中使用通配符
- laravel - 视图刀片搜索过滤器和分页在 Laravel 中消失
- css - 在 Meteor-React-Apollo-Graphql 堆栈中使用 Stylus 导入字体
- ms-access - MS Access:组合框 - 取消选择项目以返回原始状态
- java - JavaFX 14 如何导出未导出的包?
- function - 在Lua中按下键时如何执行功能?