无法在 ion-header 中调整徽标(图像)的大小

Impossible to resize a logo (image) in ion-header

我无法使用 Ionic 5 在 ion-header 和 ion-toolbar 中调整徽标的大小,我不明白为什么...

我尝试过类似的方法:

<ion-header [translucent]="true">
  <ion-toolbar>
    <img height="44" class="logo-full" alt="mylogo">
  </ion-toolbar>
</ion-header>

并且:

.logo-full{
   content: url("../assets/logo/logo-dark.png");
   height: 44px;
}

我尝试调整 header 和工具栏的大小,删除工具栏,但似乎对我没有任何作用...

我知道它通常很简单,但是每年更新,很难理解...

谢谢大家!

试试这个:

ion-toolbar, ion-header .logo-full{
   content: url("http://placekitten.com/301/301");
   width:44px;
   height: 44px;
   border:2px solid black;
}
<ion-header [translucent]="true">
  <ion-toolbar>
    <img class="logo-full" alt="mylogo">
  </ion-toolbar>
</ion-header>

200 X 44(宽度)

ion-toolbar, ion-header .logo-full{ 
  content: url("http://placekitten.com/301/301");
  width: 44px;
  height: 200px;
  border: 2px solid black;
}
<ion-header [translucent]="true">
  <ion-toolbar>
    <img class="logo-full" alt="mylogo">
  </ion-toolbar>
</ion-header>