我试图在 IE10 处于兼容模式时隐藏输入清除按钮。
我用过这个:
input[type=text]::-ms-clear, input[type=text]::-ms-reveal {
display: none;
}
这适用于 IE10 标准模式但不适用于兼容模式。
有什么办法可以做到这一点吗?有什么方法可以使用 JavaScript 禁用它吗?
最佳答案
我知道这可能不是您正在寻找的答案,但微软表示这是“设计使然”并且是浏览器的“一项功能”,不会修复它。
The product team believes this item works according to its intended design.
有些人试过设置 line-height: 0;高度:0;填充:8px; padding-bottom: 8px;
根据以下帖子取得了一定程度的成功:
How to remove clear button ( 'X' button ) from IE10 textboxes in compatibility mode?
关于css - 兼容模式下的 Internet Explorer 10::-ms-clear,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21867735/