简体   繁体   English

Internet Explorer 10 Windows 8删除文本输入和密码操作图标

[英]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;
  }

You should instead use this because of the reason in this answer . 由于此答案中的原因,您应该改用它。

/* don't show the x for text inputs */
::-ms-clear {
    width : 0;
    height: 0;
}

/* don't show the eye for password inputs */
::-ms-reveal {
    width : 0;
    height: 0;
}

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.

相关问题 Internet Explorer 10 和 11 在输入焦点时删除占位符文本 - Internet Explorer 10 and 11 remove placeholder text when the input is focused HTML文本和密码输入字段具有不同大小的Internet Explorer - HTML text and password input fields have difference size internet explorer 我正在尝试为 html 中的文本输入创建一个语音,该语音将在 Internet Explorer(Windows 10 aka Edge)中工作,有没有办法? - I am trying to create a speech to text input in html that will work in Internet Explorer (Windows 10 a.k.a Edge), is there a way? Internet Explorer 10在Windows 8上未显示自定义光标 - Internet Explorer 10 not showing custom cursor on Windows 8 输入文本上的CSS text-indent在Internet Explorer 10中不起作用 - css text-indent on input text doesn't work in internet explorer 10 在Internet Explorer 10的Windows 8上,onclick javascript函数在输入标签中插入值的值不起作用 - onclick javascript function inserting value in input tag is not working on windows 8 in internet explorer 10 在Internet Explorer中输入文本的垂直居中文本 - Vertically center text in text input in Internet Explorer Internet Explorer文本输入onkeyup char 13 - internet explorer text input onkeyup char 13 隐藏输入类型在Internet Explorer 8中提交文本 - Hide Input Type Submit Text In Internet Explorer 8 Windows 7上的Internet Explorer 10不加载嵌入字体 - Internet Explorer 10 on Windows 7 does not load embedded fonts
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM