'개발관련'에 해당되는 글 290건

  1. 2012.10.24 [CSS]CSS Advanced - CSS Pseudo-classes

출처: http://www.w3schools.com/css/css_pseudo_classes.asp


CSS pseudo-classes are used to add special effects to some selectors.


All CSS Pseudo Classes/Elements

SelectorExampleExample description
:linka:linkSelects all unvisited links
:visiteda:visitedSelects all visited links
:activea:activeSelects the active link
:hovera:hoverSelects links on mouse over
:focusinput:focusSelects the input element which has focus
:first-letterp:first-letterSelects the first letter of every <p> element
:first-linep:first-lineSelects the first line of every <p> element
:first-childp:first-childSelects every <p> elements that is the first child of its parent
:beforep:beforeInsert content before every <p> element
:afterp:afterInsert content after every <p> element
:lang(language)p:lang(it)Selects every <p> element with a lang attribute value starting with "it"






CSS Pseudo-classes

Add different colors to a hyperlink
Add other styles to hyperlinks
Use of :focus
:first-child - match the first p element
:first-child - match the first i element in all p elements
:first-child - Match all i elements in all first child p elements
Use of :lang


Pseudo-classes explained

Posted by 파노카페
: