IE10下的Input Text和谷歌下面的 input search 一旦输入内容,会在最右端出现一个叉号,点击后,内容就会自动清空,看似方便,其实有些场景并不需要,需要写代码清除掉。

代码如下:

input::-webkit-search-cancel-button{
display: none;
}  --清除谷歌浏览器下的 search 叉号
input[type=search]::-ms-clear{
display: none;
}  --清除IE下的 search 叉号

当然如果想清除所有的input的话 ,只需把[type=search]去掉即可。

 

相关文章:

  • 2022-12-23
  • 2022-03-07
  • 2022-02-17
  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
相关资源
相似解决方案