首先感謝你。css更改輸入光標/光標顏色
我想實現這樣的功能:(用於<input>
節點)
佔位符文本的顏色是:
#b8b9b9
的輸入文字的顏色:
#4e5050
輸入插入符的顏色爲:
#FF0000
我已經實現了前兩個特點1和2,代碼:
input[type='text']::-webkit-input-placeholder{
color: #b8b9b9;
}
input[type='text']:-moz-placeholder{
color: #b8b9b9;
}
input[type='text']::-moz-placeholder{
color: #b8b9b9;
}
input[type='text']:-ms-input-placeholder{
color: #b8b9b9;
}
input[type='text']:focus {
color: #4e5050;
}
但我不知道如何實現該功能,3。
我已經嘗試Styling text input caret, 上的功能,但這不適用於移動Safari瀏覽器。移動Safari瀏覽器輸入插入符號的顏色已經是iPhone的默認顏色:藍色
已經有這個 http://stackoverflow.com/questions/7339333/styling-text-input-caret –
感謝的答案,但如果我指定它不會爲移動Safari瀏覽器 – zctocm