Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

<blink> in modern browsers?

I'm working on a project to create a website for our CS faculty. There's one problem though. We want certain elements on the page highlighted in a meaningful manner. The solution must be cross-browser (i.e. must work in IE).

Thus, a question:

How to emulate blink (works perfectly in IE6) in modern browsers (think Chrome)?

Update: I've found this jQuery plugin to do the blinking, but we don't use jQuery and would prefer a CSS3 fallback for modern browsers.

like image 676
katspaugh Avatar asked Nov 30 '22 02:11

katspaugh


2 Answers

I wonder why no one has suggested CSS3 Animations:

@keyframes blink {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.blink {
  animation: blink 600ms infinite;
}

Demo on JSBin.

like image 123
katspaugh Avatar answered Dec 09 '22 16:12

katspaugh


You can just use CSS text-decoration property for that purpose:

For example:

span {
    text-decoration: blink;
}

Let all span nodes blink.. blink.. blink.. blink..

like image 41
jAndy Avatar answered Dec 09 '22 15:12

jAndy