-webkit-text-security:光盘;在IE中无法正常工作 [英] -webkit-text-security: disc; is not working in IE

查看:346
本文介绍了-webkit-text-security:光盘;在IE中无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经应用了css -webkit-text-security:disc;将该单词屏蔽为密码,但在Internet Explorer中不起作用.

I've applied css -webkit-text-security: disc; to mask the word as password, but it does not work in Internet Explorer.

这是我的代码:

.hide{
-webkit-text-security:disc;
}

<h1 class="hide">HideMe</h1>

它适用于chrome,但不适用于IE. 请给我解决方案. 谢谢.

It is working on chrome but not in IE. Please give me the solution. Thank you.

推荐答案

-webkit-

浏览器供应商有时会在实验性或非标准CSS属性和JavaScript API中添加前缀,因此,从理论上讲,开发人员可以尝试新的想法,同时从理论上防止在标准化过程中依赖他们的实验,然后破坏Web开发人员的代码.开发人员应该等到未添加前缀的属性,直到浏览器行为标准化为止.

Browser vendors sometimes add prefixes to experimental or nonstandard CSS properties and JavaScript APIs, so developers can experiment with new ideas while—in theory—preventing their experiments from being relied upon and then breaking web developers' code during the standardization process. Developers should wait to include the unprefixed property until browser behavior is standardized.

…由Webkit呈现引擎使用,而Internet Explorer不使用.

… used by the webkit rendering engine which is not used by Internet Explorer.

它是如此具有实验性,以至于它甚至都没有出现在CSS规范草案中.没有其他浏览器支持它或带有不同供应商前缀的版本.

It is so experimental that it doesn't even appear in draft CSS specs. No other browser supports it, or a version of it with a different vendor prefix.

如果要获得这种效果,则需要应用JavaScript(例如,通过使用覆盖在元素上的不可见密码字段,每次input事件触发.

If you want to get that effect, you'll need to apply JavaScript (e.g. by using an invisible password field overlaid on an element for which you add bullet characters based on the length of the value of the input each time the input event fires.

这篇关于-webkit-text-security:光盘;在IE中无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆