光标未显示在文本字段上
在此页面中:http://www.legrandclub.net 有两个文本字段。在所有 Web 浏览器中,一切正常,但在 Internet Explorer 中,当我单击两个文本字段之一时,不会显示光标,可以编写一些文本,但不会显示光标。
造成这个问题的原因可能是什么?
谢谢
in this page: http://www.legrandclub.net there are two text fields. In all web browser all works fine but in Internet Explorer the cursor is not displayed when I click on one of two text fields, it's possible to write some text but the cursor is not displayed.
Which could be the cause of this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
他们在输入字段上使用与光标相同的背景颜色(灰色)。
They're using the same background color on the input field as the cursor is (gray).
这个问题在IE中< 9 是由于在我的输入字段的左侧添加填充引起的。
通过在样式表中添加
来修复此问题
,其中左内边距也是 3px。这将光标推回到现在可见的位置。
This issue in IE < 9 was caused by adding padding to the left in my input fields.
It was fixed by adding
to the stylesheet, where padding left was also 3px. This pushed the cusror back to where it is now visible.
将 padding-left:2px 添加到文本字段样式。
Add padding-left:2px to the text field style.
我遇到了同样的问题,这就是问题所在:
您应该在该文本字段上处理“焦点”事件,因此在 IE 中的选项卡焦点上您将看不到光标。为此你还应该绑定 focusin;然后它就会起作用。以下是示例代码
希望对您有所帮助...
I encountered the same problem and this is the issue:
You should be handling the 'focus' event on that text field, so on tab focus in IE you will not see the cursor. For that you should also bind focusin; then it will work. The following is the sample code
Hope it helps...
删除解决了同样的问题。
我通过从 CSS 中
I solved the same problem by removing
from CSS.