离子v2如何在标题中插入徽标
问题描述:
如何在离子v2的标题中插入徽标?离子v2如何在标题中插入徽标
<ion-header>
<ion-navbar>
<ion-title></ion-title>
</ion-navbar>
</ion-header>
答
<ion-header>
<ion-navbar>
<ion-title>
<img alt="logo" height="40" src="img/logo.png" >
</ion-title>
</ion-navbar>
</ion-header>
页眉中离子有44px的高度。所以,您需要确保徽标尺寸小于此尺寸。
.title-image {
margin-top: 8px;
height: 27px;
}
答
这样简单。 使用:
<img alt="logo" height="40" src="img/logo.png" >
和:
<ion-header>
<ion-navbar>
<ion-title>
<img alt="logo" height="40" src="img/logo.png" >
</ion-title>
</ion-navbar>
</ion-header>