How to resize the image in ionic framework?

时间:2016-12-02 05:08:09

标签: ionic-framework

I am new to Ionic framework, I want to resize the image. The image should become small and also the image should be displayed in the center of the page using ionic.

Below is my html code:

<ion-header>
  </ion-header>
     <ion-content padding>
      <h2></h2>
       <img src='assets/img/logo.png'>
         <ion-chip color="secondary">
          <ion-label color="#16B966">SEND RESET LINK</ion-label>
         </ion-chip>
     <div>
       <span class="input-label">EMAIL</span>
        <input type="text" placeholder="asdfjkl@panini.com">
    </div>
 <ion-card-content>
   <p>Enter the email address associated with your account, and we'll email  
       a link to reset your password</p>
 </ion-card-content>
</ion-content>

1 个答案:

答案 0 :(得分:1)

Use the following in HTML:

<img class="displayed"  height="150 px" width="150 px" src="img/Logo.png">

and use the following in style.css:

.displayed {
    display: block;
    margin-left: auto;
    margin-right: auto;
}