text transition css code example

Example 1: how to transition text color css

nav a {
	transition: color 1s; /* For modern browsers */
}

Example 2: css transition on hover

/* Simple CSS color transition effect on selector */

div {
	color: white;
  	background-color: black; 
}

div:hover {
	background-color: red;
}


/* Additional transition effects on selector */

div {
	background-color: black;
  	color: white;
  	height: 100px;
  	transition: width 1.5s, height 3s;
  	width: 100px;
  	
}

div:hover {
	background-color: red;
  	height: 300px;	
  	width: 150px;
}

Example 3: css transition

transition: property duration timing-function delay|initial|inherit;

Tags:

Css Example