gpt4 book ai didi

javascript - 如何摆脱或删除 react 选择中的微调器/箭头?

转载 作者:行者123 更新时间:2023-12-04 08:45:42 25 4
gpt4 key购买 nike

我正在使用 react-select 但我无法从下拉列表中删除微调器/箭头。
The updown arrows marked in red
我可以删除默认分隔符 |和下拉指示器使用

<Select
components={{
IndicatorSeparator: () => null, DropdownIndicator: () => null
}}
{...}
/>
但是我怎样才能摆脱这些箭头呢?

最佳答案

我相信您正在设置 type=number对于input某处的元素。为了删除向上/向下箭头。您可以使用 this 中的 css 代码教程。
您还可以查看所有输入类型以及开箱即用的呈现方式 here .

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}

/* Firefox */
input[type=number] {
-moz-appearance: textfield;
}
现场演示
Edit 64341537/how-to-get-rid-of-or-remove-spinners-arrows-in-react-select

关于javascript - 如何摆脱或删除 react 选择中的微调器/箭头?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64341537/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com