[英]Internet Explorer 10 Windows 8 Remove Text Input and Password Action Icons
I am testing a highly-customized web application in Internet Explorer 10 on Windows 8, since it is an up and coming release, and will likely be using my application some day. 我正在Windows 8的Internet Explorer 10中测试一个高度自定义的Web应用程序,因为它是一个即将发布的版本,并且有一天可能会使用我的应用程序。 Take a look at this sample screenshot of some text input controls from the application:
看一下该应用程序中一些文本输入控件的示例屏幕截图:
Is there a way, either within HTML or CSS, to remove the action icons that are located to the right of the text and password input controls? 在HTML或CSS中,是否可以删除位于文本和密码输入控件右侧的操作图标?
Thank you for your time. 感谢您的时间。
You need to use the -ms-clear pseudo-element . 您需要使用-ms-clear伪元素 。 And use -ms-reveal for the password box.
并在密码框中使用-ms-reveal 。
This should do it: 应该这样做:
::-ms-clear {
display: none;
}
jeffamaphone's answer works unless the browser is in compatability mode: 除非浏览器处于兼容模式,否则jeffamaphone的答案有效:
You need to use the -ms-clear psuedo-element.
您需要使用-ms-clear psuedo-element。 And use -ms-reveal for the password box.
并在密码框中使用-ms-reveal。
This should do it:
应该这样做:
::-ms-clear { display: none;::-ms-clear {display:none;
}}
But, when the browser is in compatability mode, the reveal icon still appears. 但是,当浏览器处于兼容模式时,显示图标仍会出现。 To get around this, force the browser into IE10 mode with this tag <meta http-equiv="x-ua-compatible" content="IE=edge">
要解决此问题,请使用此标记<meta http-equiv =“ x-ua-compatible” content =“ IE = edge”>强制浏览器进入IE10模式。
Remove action icons from text fields in Internet Explorer 10 just use this css pseudo element 从Internet Explorer 10中的文本字段中删除操作图标,只需使用此CSS伪元素
::-ms-clear {
display: none; }
Remove action icons from password fields in Internet Explorer 10 just use this css pseudo element 从Internet Explorer 10的密码字段中删除操作图标,只需使用此CSS伪元素
::-ms-reveal
{
display: none;
}
I don't have Windows 8 preview but have you tried just creating a custom input field using HTML and CSS? 我没有Windows 8预览,但是您是否尝试过使用HTML和CSS创建自定义输入字段? Maybe try this : http://www.webdesign4me.nl/Knowledge-Base/custom-input-field-using-html-and-css
也许尝试一下: http : //www.webdesign4me.nl/Knowledge-Base/custom-input-field-using-html-and-css
The solution for IE10-docmode "standard" has been posted before. 以前已发布IE10-docmode“标准”解决方案。
I incidentially found some kind of workaround which is independent from IE10-docmode. 我偶然发现了一种独立于IE10-docmode的解决方法。 If you can live with changing the width of all inputs to a maximum of 80 pixels use the following jquery:
如果您可以将所有输入的宽度最大更改为80像素,请使用以下jquery:
$("input[type=text]").width(80);
Perhaps not the best solution, but if any of the other solutions on this page aren't working for you, try this. 可能不是最好的解决方案,但是如果此页面上的任何其他解决方案都不适合您,请尝试此操作。
Place a blank background image on the :before of the input. 在输入之前的::上放置空白背景图像。 More specifically - I had my own clear button styled like the website, and IE underlayed its own.
更具体地说-我有自己的清晰按钮,其样式类似于网站,而IE则是其自身的基础。 I changed the original transparent PNG with my clear icon, with a solid background one.
我用透明图标更改了原始的透明PNG,并带有纯色背景。
Other browsers don't see a difference, and it blocks the IE clear button. 其他浏览器没有区别,它阻止了IE清除按钮。 Only works when the input background color doesn't change I suppose.
我想只有在输入背景颜色不变的情况下才有效。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.