开发者

Why does only one of these @-webkit-keyframes declarations fail?

开发者 https://www.devze.com 2023-02-11 00:00 出处:网络
I have two -webkit-keyframes declarations (see below). blink2 works fine. blink does nothing. What\'s the deal? Is there a limit to the number of keyframes that can be declared?

I have two -webkit-keyframes declarations (see below). blink2 works fine. blink does nothing. What's the deal? Is there a limit to the number of keyframes that can be declared?

@-webkit-keyframes blink {
    0% {
        opacity:1;
    }
    40% {
        opacity:1;
    }
    50% {
        opacity:.5;
    }开发者_如何学Python
    90% {
        opacity:1;
    }
    99% {
        opacity:1;
    }
}

@-webkit-keyframes blink2 {
    0% {
        opacity:1;
    }
    50% {
        opacity:.25;
    }
    100% {
        opacity:1;
    }
}


Keyframes must always have a 0% or a "from" AND a 100% or a "to" in their declaration, otherwise they don't work. That's why blink doesn't work and blink2 does.

What is the end state of "blink" supposed to be?

0

精彩评论

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