Blink not working in Chrome

2019-02-16 10:23发布

I am using blink in my application to display error message. The problem is that it's working in Firefox but not in Chrome. I don't know what the problem is. How can I make it to work in Chrome?

5条回答
虎瘦雄心在
2楼-- · 2019-02-16 10:42

It is deprecated so you might try to do it with javascript. Here is an example I made out of jquery for you: http://jsfiddle.net/FPsdy/ It is very simple:

window.setInterval(function(){
  $('.blink').toggle();
}, 250);
查看更多
欢心
3楼-- · 2019-02-16 10:52

Blink is deprecated, and you should not use it.

http://www.w3.org/wiki/HTML/Elements/blink

查看更多
我命由我不由天
4楼-- · 2019-02-16 10:58
blink, .blink {
    -webkit-animation: blink 1s step-end infinite;
    -moz-animation: blink 1s step-end infinite;
    -o-animation: blink 1s step-end infinite;
    animation: blink 1s step-end infinite;
}
@-webkit-keyframes blink { 67% { opacity: 0 }}
@-moz-keyframes blink {  67% { opacity: 0 }}
@-o-keyframes blink {  67% { opacity: 0 }}
@keyframes blink {  67% { opacity: 0 }}
查看更多
\"骚年 ilove
5楼-- · 2019-02-16 10:59

Try adding the following lines of code to your css file.

blink {
   -webkit-animation-name: blink; 
   -webkit-animation-iteration-count: infinite; 
   -webkit-animation-timing-function: cubic- 
    bezierr(1.0,0,0,1.0);
    -webkit-animation-duration: 1s;
  }

This is because many browsers doesn't support few css functions. You should try updating your chrome browser.

查看更多
\"骚年 ilove
6楼-- · 2019-02-16 11:01

Add following code to your css file,

blink {
-webkit-animation-name: blink; 
-webkit-animation-iteration-count: infinite; 
-webkit-animation-timing-function: cubic-bezier(1.0,0,0,1.0);
-webkit-animation-duration: 1s;
}
查看更多
登录 后发表回答