The :focus selector is used to select the element that has focus. (e.g.: a selector text field)

Example:

input:focus { 
     background-color: yellow;
}

 

Source: http://www.w3schools.com/CSSref/sel_focus.asp