http://learn.shayhowe.com/advanced-html-css/complex-selectors

LESSON 3
Complex Selectors

CSS3 帶來全新的 Selector 使用方式,討論新舊 Selector,最好的使用方式

  1. Common Selectors 基礎的 Selector
  1. type selector:HTML宣告的 element 種類
  2. class selector:用 element 的 class attribute value 來識別,可以被多個elements reused
  3. id selector:使用 id attribute 來識別,在單一網頁上 unique的
  1. Child Selectors
  1. descendant selector(後代)
  1. direct child selector(直屬)
  1. Sibling Selectors
  1. general sibling selector(同層全體)
  1. adjacent sibling selector(同層相鄰)
  1. Attribute Selectors (CSS 2.1 之後)
    主要是屬性隨著方括號的選擇器
  1. attribute present selector
  1. attribute equals selector
  1. attribute contains selector
  1. attribute begins with selector
  1. attribute ends with selector
  1. attribute spaced selector
  1. attribute hyphened selector
  1. Pseudo-classes 偽類或擬類
  1. link pseudo-classes
  1. user action pseudo-classes
  1. user interface state pseudo-classes 介面狀態相關
  1. structural & position pseudo-classes
  1. target pseudo-class
  1. empty pseudo-calss
  1. negation pseudo-class
  1. Pseudo-elements
  1. textural pseudo-elements
  1. generated content pseudo-elements
  1. fragment pseudo-elements