Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
462 views
in Technique[技术] by (71.8m points)

How to change the color of the placeholder text using react-bootstrap-typeahead?

Using react-bootstrap-typeahead there is an option to provide placeholder text.

How can I change the color of this text? I can't find the relevant selector to target the placeholder text element on the demo page:

enter image description here

question from:https://stackoverflow.com/questions/65855040/how-to-change-the-color-of-the-placeholder-text-using-react-bootstrap-typeahead

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I found the answer at https://stackoverflow.com/a/31045763/906814 - it's completely unrelated to react-bootstrap-typeahead, which after all just creates a standard input with a placeholder:

input[type="text"]::-webkit-input-placeholder {
  color: red;
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...