输入[text]的一部分是灰色的吗? [英] Make part of input[text] grey?

查看:140
本文介绍了输入[text]的一部分是灰色的吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你知道谷歌即时,当他们提供建议时,他们建议的搜索字段会变成灰色,但你输入的位总是黑色的。好吧,我希望用类似的系统达到同样的效果。我该怎么办呢?

You know how google instant, when they provide suggestions, the bit of the search field that they suggested turns grey, but the bit you typed is always black. Well I want to achieve the same effect with a similar system. How would I go about this?

谢谢,Fela

推荐答案

您将需要两个位于彼此顶部的文本框。使文本框顶部具有透明背景(这些将是可选文本框)。然后将后面的文本框颜色设置为灰色(这将是显示建议的文本框)。

You will need 2 textboxes positioned on top of each other. Make the textbox on top have a transparent background (these will be the selectable textbox). Then set the color of the textbox behind to grey (this will be the textbox displaying the suggestion).

这篇关于输入[text]的一部分是灰色的吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆