16-11-2011

CSS/(X)HTML CSS3 transition example

The CSS 3 transition specification makes it possible to make very impressive animations with just a few lines of CSS. Here´s a quick example for your reference. Vendor prefixes are still very necessary at the time of writing but will probably be less important soon.

a{	
	font-size:11px;
	background:white;
	color:black;
 
	-webkit-transition: 2s ease-in-out all;
	-moz-transition: 2s ease-in-out all;
	-ms-transition: 2s ease-in-out all;
	-o-transition: 2s ease-in-out all;
	transition: 2s ease-in-out all;
}
 
a:hover{
	color:white;
	background:black;
	font-size:24px;
}

Comments:

Your comment:

»

 

[x]