0
我希望能够在可能的情况下打开/关闭搜索框中的占位符。在html文本/搜索元素中关闭(忽略)占位符属性
<input type="text" placeholder="Enter name" />
<input type="search" placeholder="Type to search" />
我迄今为止尝试:
input[type="search"]::-webkit-input-placeholder{
content: "";
color:red; /*test selector*/
}
的jsfiddle http://jsfiddle.net/cqocxhzt/1/具有角这样的
@epascarello你能给我一个 - *多一点* - 直接的答案吗?我没有得到它 – celerno 2014-10-08 17:22:05
尝试'颜色:透明',如果你想用CSS来“隐藏”占位符。 – lexith 2014-10-08 17:23:09