Check out example codes for "how to use hover in css". It will help you in understanding the concepts better.

Code Example 1

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

Code Example 2

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

.selector {
	background-color: black;
}

.selector:hover {
	background-color: blue;
}

Code Example 3

a:hover{ 
	background-color: yellow;
}

Code Example 4

a:hover
 { 

   background-color: yellow;

 }

Code Example 5

/* 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;
}

Learn ReactJs, React Native from akashmittal.com