pseudo class

Understand Pseudo-classes in CSS

Sometimes, you may want to style an element based on something other than the structure of the document. For example: the state of a link (visited? hover? … etc) or form element (focused? for example). So, How to do this using CSS? This can be done using a pseudo-class selector. Pseudo-class starts with colon then the class name, :link – :hover – :visited .. and so on Here are some examples: Makes all unvisited links Black: a:link { color: black; } Makes all visited links Brown: a:visited { color: brown; } Makes links red when hovered: a:hover { color: red; …

Continue Reading…Understand Pseudo-classes in CSS