Mohsen
Mohsen

Reputation: 65835

Showing blinking cursor in unfocused text input

I need to do this without any hack. Thanks.

Upvotes: 7

Views: 3013

Answers (2)

Már Örlygsson
Már Örlygsson

Reputation: 14606

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...

Upvotes: 1

pixelfreak
pixelfreak

Reputation: 17844

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

Seriously though, don't confuse gentle users :)

Upvotes: 0

Related Questions