如何为text
html 类型的输入字段设置CSS 以显示为密码字段,即输入中的文本似乎被诸如星号(“ *”)或点(“•” )?
我有这个约束:
<input name="passwordish" type="text" id="inputPassword" placeholder="Password" >
Run Code Online (Sandbox Code Playgroud)
编辑:很抱歉,如果不清楚,但是由于某些雪花飘落的原因,我无法更改字段类型!
建议您将文本类型更改为密码
<input name="password" type="password" id="inputPassword" placeholder="Password" >
或这个
input { -webkit-text-security: none; }
input { -webkit-text-security: circle; }
input { -webkit-text-security: square; }
input { -webkit-text-security: disc; /* Default */ }
Run Code Online (Sandbox Code Playgroud)
更新:
尝试这个:
input { -webkit-text-security: none; }
input { -webkit-text-security: circle; }
input { -webkit-text-security: square; }
input { -webkit-text-security: disc; /* Default */ }
Run Code Online (Sandbox Code Playgroud)
更新:
Firefox不再支持以下CSS:
-webkit-text-security
-moz-text-security
在Firefox 69.0,Windows 10、64位,
归档时间: |
|
查看次数: |
108 次 |
最近记录: |