css - IOS 中的 ionic 搜索背景颜色

标签 css ionic-framework search toolbar

我使用的是 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/

相关文章:

cordova - InAppBrowser 有时为空/空白

android - 在 Visual Studio 2013 中使用 Visual Studio Tools for Apache Cordova 构建 Android Emulator 时无法加载资源

javascript - 自动检测位置(城市和州),并将该信息分别放入输入和选择字段中

javascript - 水平自动收报机被过早切断?

css - 使用 LESS 进行 CSS 渲染会破坏基于浏览器的开发吗?

html - 带有富文本的 QML 文本元素 : How to adjust vertical position of an <img>

ios - Ionic 在 iOS 上构建和模拟 - 错误

algorithm - 为速度牺牲准确性的搜索/排序算法

android - 如何模糊搜索对话框的背景?

css - 如何将 CSS 引用添加到 .NET SyndicationFeed?