Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Cancel a CSS3 animation when anchor is visited Re: Cancel a CSS3 animation when anchor is visited

#89204

Shorthand doesn’t require each value to be present, only those you are using. Think about the shorthand for background, it still works fine if you only declare a color.

Here is a test case: http://tinkerbin.com/c0SK9ejA

The other way you can do it, if you don’t want to use animation: none; is to set the animation on the following selecter:

a:not(:visited)

Although that won’t work yet as we have learnt that animations don’t play nice with the :visited pseudo-class.