我知道有这个职位上改变占位符文本.我已经尝试在我的textarea标签上实现
textarea::-webkit-input-placeholder {
color: #fff;
}
textarea:-moz-placeholder { /* Firefox 18- */
color: #fff;
}
textarea::-moz-placeholder { /* Firefox 19+ */
color: #fff;
}
textarea:-ms-input-placeholder {
color: #fff;
}
Run Code Online (Sandbox Code Playgroud)
但它没有做任何事情.我错过了什么?
这就是我textarea的一个样子
<textarea
onChange={(e) => this.props.handleUpdateQuestion(e, firstQuestion.Id)}
placeholder="Overall Satisfaction Question"
name="SEO__Question__c"
type="text"
className="slds-input"
value={firstQuestion.SEO__Question__c ? firstQuestion.SEO__Question__c : ''}
style={inputStyle}
autoFocus
/>
Run Code Online (Sandbox Code Playgroud)
Rok*_*jan 25
包含引号:
onchange="{(e) => this.props.handleUpdateQuestion(e, firstQuestion.Id)}"
Run Code Online (Sandbox Code Playgroud)
否则,它应该工作得很好:
textarea::-webkit-input-placeholder {
color: #0bf;
}
textarea:-moz-placeholder { /* Firefox 18- */
color: #0bf;
}
textarea::-moz-placeholder { /* Firefox 19+ */
color: #0bf;
}
textarea:-ms-input-placeholder {
color: #0bf;
}
textarea::placeholder {
color: #0bf;
}Run Code Online (Sandbox Code Playgroud)
<textarea placeholder="test"></textarea>Run Code Online (Sandbox Code Playgroud)
小智 10
我不确定,但我认为没有必要立即使用前缀.
textarea::placeholder {
color: #fff;
}
Run Code Online (Sandbox Code Playgroud)