Value/Placeholder - different styling for words

前端 未结 2 1293
伪装坚强ぢ
伪装坚强ぢ 2021-01-19 17:52

I\'m having problem with placeholders. I want to ask, is there possibility to style value in input fields but in the way to style words of that value different.

For

相关标签:
2条回答
  • 2021-01-19 18:56

    You may change the color of an input using the color style attribute. Having separate colors for each word is much harder. You need to have an overlay that displays the right colors. Besides, the cursor would disappear, so that the user wouldn't know where he currently is.

    0 讨论(0)
  • 2021-01-19 18:58

    unfortunately its not possible. when it comes to styling the form elements, there are many hindrances, color can be set to for an element not chracters, try this:

    http://jsfiddle.net/Fgd2e/1/

    0 讨论(0)
提交回复
热议问题