【发布时间】:2019-12-13 11:28:57
【问题描述】:
- 我是 react select 的新手。
- 我正在尝试使用 css 设置占位符的样式
- 所以我在沙盒中构建了一个原型。
- 我尝试使用 css 更改占位符的颜色。
- 我将颜色设为红色,但仍未覆盖
- 你能告诉我如何解决它吗?
在下面提供我的沙箱和代码 sn-p。
即使我搜索了占位符 css,得到了这个链接但仍然没有帮助我
https://www.w3schools.com/cssref/sel_placeholder.asp
https://codesandbox.io/s/react-codesandboxer-example-1q8nd
<Select
defaultValue={""}
label="Single select"
placeholder={" Placeholder test "}
options={flavourOptions}
theme={theme => ({
...theme,
borderRadius: 0,
colors: {
...theme.colors,
primary25: "hotpink",
primary: "black",
background: "red",
color:"red",
}
})}
/>
【问题讨论】:
标签: javascript html css reactjs redux