我使用的是 Ionic 3.2,但 Ionic 搜索栏的背景颜色出现问题。代码如下:
</ion-navbar>
<ion-toolbar class="search-toolbar">
<ion-searchbar
[(ngModel)]="myInput"
[showCancelButton]="true"
(ionCancel)="onCancel($event)" (search)="searchByKeyword($event)">
</ion-searchbar>
</ion-toolbar>
</ion-header>
它在 Android 上工作得很好,在 Safari 浏览器(在 Mac 上)上工作。 当我在 iPhone 上运行该应用程序时,问题就开始了。输入背景不是白色。相反,它与输入栏外的背景颜色相同,即深灰色。
我已经试过了:
.searchbar-md .searchbar-input
{
background: white !important;
}
尽管有此更改,问题仍然存在。
这个bug有解决办法吗?我即将从 ios 中删除搜索栏。
最佳答案
你试过吗:
.searchbar-ios .searchbar-input {
background-color: white !important;
}
关于css - IOS 中的 ionic 搜索背景颜色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54520812/