CSS 在浏览器模式:IE9 文档模式:某些输入上的 IE9 时删除“清除字段”X 按钮?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19244916/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Remove “clear field” X button when Browser Mode : IE9 Document Mode:IE9 on certain inputs?
提问by Venki
How to remove the “clear field” X button when Browser Mode : IE9 Document Mode:IE9 on certain inputs.
I use this code
如何在浏览器模式下删除“清除字段”X 按钮:IE9 文档模式:某些输入上的 IE9。
我用这个代码
<STYLE type="text/css">
input[type=text]::-ms-clear{
display: none;
}
input[type=password]::-ms-reveal{
display: none;
}
</STYLE>
It's working fine when I choose browser mode like Browser Mode : IE9 and Document Mode:Standards and same as it is in (IE8,IE7).But it's not working for when I choose browser mode Browser Mode : IE9 and Document Mode:IE9 and same as it is in (IE8,IE7).
当我选择浏览器模式,如浏览器模式:IE9 和文档模式:标准并且与 (IE8,IE7) 相同时,它工作正常。但是当我选择浏览器模式浏览器模式:IE9 和文档模式:IE9 和与 (IE8,IE7) 中的相同。
回答by EricLaw
This only appears inside IE10+ when you emulate older modes; you can't disable it using the CSS property as it's only defined in IE10+ mode.
这仅在您模拟旧模式时出现在 IE10+ 中;您不能使用 CSS 属性禁用它,因为它仅在 IE10+ 模式下定义。
Dupe of
被骗
- IE 10's -ms-clear pseudo-element, and IE5 quirks mode
- Remove IE 10 Clear Button From Input Field
- http://answers.microsoft.com/en-us/ie/forum/ie10-windows_7/how-can-input-clear-button-be-hidden-if-ie10-is/8f55602f-1a6b-452d-8cb3-e4cc6034b138
- https://stackoverflow.com/a/15227216/126229
- How can I disable the clear button that IE10 inserts into textboxes?