开发者

Showing blinking cursor in unfocused text input

开发者 https://www.devze.com 2023-02-21 11:19 出处:网络
I need to do this without开发者_Python百科 any hack. Thanks.You won\'t be able to do this without some sort of hackery.

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

精彩评论

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