0
我同意这个问题有很多答案。如何从输入type =“text/search”控件中删除'X'
如:
等等,但已经尝试了所有这些,但我还是无法从删除 “X”输入字段。
我刚刚创建简单的输入控制:
<input type="text" id="RemoveX" />
这里是我的CSS:
input[type=text]::-ms-clear { display: none; width : 0; height: 0; }
input[type=text]::-ms-reveal { display: none; width : 0; height: 0; }
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration { display: none; }
#RemoveX::-ms-clear { display: none; width : 0; height: 0; }
#RemoveX::-ms-reveal { display: none; width : 0; height: 0; }
#RemoveX::-webkit-search-decoration,
#RemoveX::-webkit-search-cancel-button,
#RemoveX::-webkit-search-results-button,
#RemoveX::-webkit-search-results-decoration { display: none; }
我使用IE 11,并用兼容模式一切检查被罚款,我没有测试此在任何浏览器中(因为我不需要),我只想从IE 10+浏览器的输入字段中删除X。
任何帮助将不胜感激。