开发者

Showing blinking cursor in unfocused text input

I need to do this without开发者_Python百科 any hack. Thanks.


You won't be able to do this without some sort of hackery.

Here's a simple pure CSS hack:

input {
  background-image:     url(cursor-anim.gif);
  background-position:  4px 50%;
}
input:focus {
  background-image: none;
}

But, as others have said, It might be worth asking yourself if this may lead to your users getting confused...


Wrap a pipe (|) in a blink tag (ugh) and position it absolutely over a text input!

Seriously though, don't confuse gentle users :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜