我该如何更改html5 textarea占位符颜色?

时间:2018-03-30 18:05:16

标签: html css html5 css3

我正在尝试更改输入和textarea占位符颜色。但这只是投入的工作。它不适用于textarea占位符颜色。如何更改textarea占位符颜色?[在此处输入图像描述] [1]

https://i.stack.imgur.com/8esKN.png   https://i.stack.imgur.com/VCvE3.png

1 个答案:

答案 0 :(得分:2)

之前我有同样的问题。

在这里试试:

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;  
}
发现了 change placeholder text color of textarea

相关问题