Ela*_*ter 7 css safari google-chrome
我正在使用all: unseton <input type="password" placeholder="text of placeholder">,占位符变成了点。
HTML:
<input type="password" placeholder="text of placeholder">
Run Code Online (Sandbox Code Playgroud)
CSS:
::placeholder {
all: unset;
}
Run Code Online (Sandbox Code Playgroud)
占位符的错误视觉结果:
有没有办法仍然使用all: unset并带回正确显示的占位符的值?
尝试-webkit-text-security: initial;(https://developer.mozilla.org/en-US/docs/Web/CSS/-webkit-text-security)
.reset-input::placeholder {
all: unset;
-webkit-text-security: initial;
}Run Code Online (Sandbox Code Playgroud)
<label>Reset Input</label>
<input class="reset-input" type="password" placeholder="placeholder text">
<br><br>
<label>UnReset Input</label>
<input type="password" placeholder="placeholder text">Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
877 次 |
| 最近记录: |