2011-10-28 7 views
7

Je ne pouvais pas obtenir des transitions à travailler sur this page, quelqu'un a une idée pourquoi?CSS3 Transition ne fonctionne pas

div.sicon a { 
    transition: background 0.5s linear; 
    -moz-transition: background 0.5s linear; /* Firefox 4 */ 
    -webkit-transition: background 0.5s linear; /* Safari and Chrome */ 
    -o-transition: background 0.5s linear; /* Opera */ 
    -ms-transition: background 0.5s linear; /* Explorer 10 */ 
} 
+1

Quel est exactement le problème? –

+0

semble très bien pour moi de toute façon sur la page ne peut donc pas voir quel est le problème. –

+0

Qu'est-ce que vous essayez de faire en arrière-plan? –

Répondre

11

La transition est plus comme une animation.

div.sicon a { 
    background:-moz-radial-gradient(left, #ffffff 24%, #cba334 88%); 
    transition: background 0.5s linear; 
    -moz-transition: background 0.5s linear; /* Firefox 4 */ 
    -webkit-transition: background 0.5s linear; /* Safari and Chrome */ 
    -o-transition: background 0.5s linear; /* Opera */ 
    -ms-transition: background 0.5s linear; /* Explorer 10 */ 
} 

Vous devez donc appeler cette animation avec une action.

div.sicon a:hover { 
    background:-moz-radial-gradient(left, #cba334 24%, #ffffff 88%); 
} 

Vérifiez également le support du navigateur et si vous avez toujours un problème avec ce que vous essayez de faire! Vérifiez css-overrides dans votre feuille de style et vérifiez également behavior: ***.htc hacks css .. il peut y avoir quelque chose de surcharger votre transition!

Vous devriez vérifier ceci: http://www.w3schools.com/css/css3_transitions.asp

Questions connexes