How to hide the Clear button in Windows Internet Explorer 10

Summary

Windows Internet Explorer 10 introduces a new Clear button for text input fields. This button will be displayed in all rendering modes, but only if the text input control has focus and is not empty. Once pressed, the input field gets cleared.

There is also a new associated pseudo-element called ::-ms-clear. This pseudo-element applies one or more styles to the Clear button. The following code example demonstrates how you can use this pseudo-element to hide the Clear button:

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title></title>
<style type="text/css">

::-ms-clear {
;
}
</style>
</head>
<body>
<input type="text" />
</body>
</html>

The above code works as expected in Internet Explorer 10 Document Mode.


More Information

The current design is that the Clear button will be displayed in all Internet Explorer 10 Document Modes, but styles can only be applied in Internet Explorer 10 Standard Document Mode.
Propriétés

ID d'article : 2813492 - Dernière mise à jour : 8 févr. 2013 - Révision : 1

Commentaires