html - input输入框光标focus后光标不见,输入的文字看不到,但placeholder会消失
本文介绍了html - input输入框光标focus后光标不见,输入的文字看不到,但placeholder会消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
双击用户名输入框使用浏览器缓存的用户名的话有光标,删除一个字符光标就没了,但剩下的用户名应该还在,这时候placeholder不显示。好蛋疼。
代码:
<span>
<input type="text" name="userId" placeholder="手机号/邮箱/用户名" ng-model="userId" required ng-blur="checkRemb()" />
<span class="icon_user"></span>
error-tip ng-show="signInForm.userId.$invalid && signInForm.submitted" msg="账号不能为空" style="color:red;margin-left: 2em;"></error-tip>
</span>
<span>
<input type="password" name="FPassword" placeholder="密码" ng-model="FPassword" required />
<error-tip ng-show="signInForm.FPassword.$invalid && signInForm.submitted" msg="密码不能为空" style="color:red;margin-left: 2em;"></error-tip>
</span>
解决方案
文字颜色和背景色一样了?
这篇关于html - input输入框光标focus后光标不见,输入的文字看不到,但placeholder会消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文