我惊喜已经downvoted在我的答案。下面是我清楚得到我的答案。它完全为我工作。
我profile.ts
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
/*
Generated class for the GeneralMyprofile page.
See http://ionicframework.com/docs/v2/components/#navigation for more info on
Ionic pages and navigation.
*/
@Component({
selector: 'page-general-myprofile',
templateUrl: 'general-myprofile.html'
})
export class GeneralMyprofilePage {
constructor(public navCtrl: NavController) {}
ionViewDidLoad() {
console.log('Hello GeneralMyprofilePage Page');
}
}
我profile.html
<ion-header>
<ion-navbar color="accent">
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>My Profile</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-card>
<ion-item>
<ion-avatar item-start>
<img src="assets/img/marty-avatar.png" style="height: 100px; width: 100px;">
</ion-avatar>
<h2>Marty McFly</h2>
<p>November 5, 1955</p>
</ion-item>
<img src="img/advance-card-bttf.png">
<ion-card-content>
<p>Wait a minute. Wait a minute, Doc. Uhhh... Are you telling me that you built a time machine... out of a DeLorean?!
Whoa. This is heavy.</p>
</ion-card-content>
<ion-row>
<ion-col>
<button ion-button icon-left clear small>
<ion-icon name="thumbs-up"></ion-icon>
<div>12 Likes</div>
</button>
</ion-col>
<ion-col>
<button ion-button icon-left clear small>
<ion-icon name="text"></ion-icon>
<div>4 Comments</div>
</button>
</ion-col>
<ion-col center text-center>
<ion-note>
11h ago
</ion-note>
</ion-col>
</ion-row>
</ion-card>
</ion-content>
结果---我的原始图像具有88px相等的高度和宽度X 88px
自己的形象与不平等的高度和宽度在281px X 256PX原始图像
结果(那么为什么没有为你工作是,你有不平等的高度和宽度)
现在经过我调整你平等的高度和宽度的原始图像的200像素X 200像素
结果
_nothing worked_ ..你的意思是像didnt负荷?你有错误吗? –
造型不准确.. –
你可以添加一些截图来显示你正在得到什么吗? –