如何从ionic4中的离子选择中删除小插入符 [英] How to remove small caret from ion-select in ionic4

查看:11
本文介绍了如何从ionic4中的离子选择中删除小插入符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 ion-select 中删除内置的灰色小插入符,并使用我的改为自定义插入符号(箭头).

I want to remove the inbuilt grey small caret from ion-select, and use my custom caret(arrow) instead.

代码:

ion-select {
  color: grey;
  background:url("/assets/resources/img/ArrowDownConfig.svg");
}

但我的 css 代码无法优先于 ionic(inbuilt).

But my css code is unable to precedence over the ionic(inbuilt).

您可以看到图像中有两个箭头,一个是内置的,另一个是自定义的.我想删除内置(离子)一个.

You can see there are two arrows in the image, one is inbuilt and another is custom. I want to remove inbuilt(ionic) one.

推荐答案

我已经创建了 this 指令,您可以将其添加到您的 ion-select 中,使其看起来就像其他带有占位符的离子元素(无箭头).

I've created this directive which you can add to your ion-select to make it look just like other ion elements with placeholder (without arrow).

用法:

<ion-select placeholder="Choose" appNoArrow>...

这篇关于如何从ionic4中的离子选择中删除小插入符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆