占位符中有两种不同的文本样式 [英] Two different text styles in placeholder
本文介绍了占位符中有两种不同的文本样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可以在输入框占位符中使用两种样式吗?
Is it possible to have two styles in an input box placeholder?
这里是我要查找的示例:
http://i.imgur.com/uQ3zf.png
Here is an example of what I'm looking for: http://i.imgur.com/uQ3zf.png
推荐答案
选项将使用具有文本的背景图片,或使用带有文本的元素叠加或将文本叠加到输入。
Options would be use a background image that has the text, or use an element overlay with th text or put the text behingd the imput.
这里是一个简单的演示,将文本放在输入和隐藏它的焦点
Here's a simple demo that places the text behind the input and hides it on focus
这篇关于占位符中有两种不同的文本样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文