on hover css

CSS
/* Changes an element's color on hover */

.selector {
	background-color: black;
}

.selector:hover {
	background-color: blue;
}  
    /* unvisited link */
a:link {
  color: green;
}

 
/* visited link */

 a:visited {
  color: green;
}

/* mouse over link */

 a:hover {
  color: red;
}

/* selected link */

 a:active {
  color: yellow;
}
  
   
a:hover{ 
	background-color: yellow;
}
  
 /* 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;
}
    
    a:hover
 { 

   background-color: yellow;

 }
  
 .a:hover{background-color: black;}
Source

Also in CSS: