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