Why doesn't my keyframe animation for link color work in Chrome?

前端 未结 1 1181
孤街浪徒
孤街浪徒 2021-01-18 11:18

Using @keyframes (and animation) to animate a color does not work in Chrome.

Demo: https://jsfiddle.net/ed3pypwr/
In Chrom

相关标签:
1条回答
  • 2021-01-18 11:22

    Old versions (<43) of Chrome use the prefixed @-webkit-keyframes instead of the standard @keyframes. So full support would look like this:

    @-webkit-keyframes test
    {
       from { color: red; }
       to { color: green; }
    }
    @keyframes test
    {
       from { color: red; }
       to { color: green; }
    }
    

    Update:

    I've been doing some tests with various different methods and it works only if the link has not been visited (why, I don't know).

    Example

    0 讨论(0)
提交回复
热议问题