pseudo css elements code example

Example 1: pseudo class css

.element:nth-child(1)
.element:hover
.element:visited

Example 2: pseudo elements css

psuedo element(An intuitive answer):
							keywords added to selectors (which are followed by 
                            colon ':' or double colon '::') which allow to target
                            specific element (or specific part of element).
example:
 you can style the first letter of a paragraph as->  p:first-letter{/*styles*/}

STRONG NOTE:  Keep in mind that  ::first-line pseudo-element  must be applied
			  to block level (elements which break line on use)
			  elements in order to take effect.

Example 3: css pseudo classes

/* unvisited link */
a:link {
  color: #FF0000;
}

/* visited 
link */
a:visited {
  color: #00FF00;
}

/* mouse over link */

a:hover {
  color: #FF00FF;
}

/* selected link */
a:active {

  color: #0000FF;
}

Tags:

Css Example