如何使文本框与背景区分开? [英] How to make a textbox indistinguishable from the background?
本文介绍了如何使文本框与背景区分开?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我应将哪个CSS应用于与背景相同的文本框,这意味着用户不会感觉自己在文本框中键入内容?我尝试提供相同的背景颜色,但仍然无法提供我想要的确切颜色.用户仍然可以感觉到它是一个文本框.
Which css should I apply to textbox that make it same as background means user does not feel like he is typing in textbox? I tried giving same background color but it still doesn't provide exact what I want. User still can feel that it's a textbox.
推荐答案
您是说这样吗?
input {
border: 0;
background: transparent /* the important bit */
}
实时演示 (我添加了蓝色父元素上的边框,这样您就可以看到< input>
的位置)
http://jsfiddle.net/eUmr2/1/(使用渐变背景可以更轻松地看到透明
)
Live Demo (I added a blue border on a parent element so you can see where the <input>
is)
http://jsfiddle.net/eUmr2/1/ (with gradient background to more easily see the transparent
)
似乎可以在IE6中使用
Appears to work in IE6:
这篇关于如何使文本框与背景区分开?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文