html - 在 Ionic 5 中更改 ion-searchbar 输入的字体大小

标签 html css ionic-framework ionic5

如何更改 ion-searchbar 的字体大小输入?任何人都可以请帮忙。

<ion-searchbar></ion-searchbar>

这是我尝试过的,但这不起作用
.searchbar-input {
  font-size: 10px;
}

请引用我在 Stackblitz 中创建的工作示例

最佳答案

在 ionic 5

global.scss

ion-searchbar {
    .searchbar-input-container {
        input{
            font-size: 14px !important;
        }
    }
}

关于html - 在 Ionic 5 中更改 ion-searchbar 输入的字体大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60908836/

相关文章:

javascript - 在 HTML Canvas 内加载的图像上绘制

javascript - ionic 后退按钮未显示在选项卡页面中且动画丢失

javascript - 验证文本区域输入的字母数字值

html - 网页在 Internet Explore 上对齐不当

html - 转换标题元素的文本

css - 如何在 Oracle APEX 5 中添加自定义 css 字体图标

javascript - 使用 ng-if 时不显示 ionic View 标题

html - 如何在容器中居中放置两个 float 元素?

html/css - 创建自扩展动态 div

html - 为什么 W3C 建议将输入元素包装在 <p> 标签中?