Javascript 隐藏“反应选择”组件中的旋转按钮

Javascript 隐藏“反应选择”组件中的旋转按钮,javascript,html,css,reactjs,Javascript,Html,Css,Reactjs,我正在我的项目中使用组件。在Windows/Chrome浏览器上测试时,会显示旋转按钮。 我做了一些研究,并将以下样式添加到我的应用程序的根css中,但它也不起作用 input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } input[type='number'] { -moz-appearance: textfield;

我正在我的项目中使用组件。在Windows/Chrome浏览器上测试时,会显示旋转按钮。

我做了一些研究,并将以下样式添加到我的应用程序的根css中,但它也不起作用

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}

如何隐藏旋转按钮?

我想您可以简单地将这一行添加到组件中。
components={{dropdowndindicator:()=>null,IndicatorSeparator:()=>null}
输入::-webkit外部旋转按钮,
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    /* display: none; <- Crashes Chrome on hover */
    -webkit-appearance: none; /* Safari */
    -ms-appearance: none; /* IE 10 and IE 11 */
    -moz-appearance: none; 
    appearance: none; /* Standard syntax */
    margin: 0; /* <-- Apparently some margin are still there even though it's hidden */
}
/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}
输入::-webkit内部旋转按钮{
/*显示:无;抱歉,我不打算隐藏下拉指示器,而是从中隐藏旋转按钮。我正在Windows/Chrome中进行测试,Windows操作系统在这里有区别吗?