ก๊วนซอฟท์แวร์ </softganz> SoftGang (Gang Software)

Web &amp; Software Developer Gang.

30 CSS Selectors ที่คุณต้องจำ

by Little Bear @16 พ.ย. 55 20:23 ( IP : 122...105 ) | Tags : CSS

โลกของ CSS3 หากคุณเข้าใจและจดจำ CSS Selecter ได้อย่างขึ้นใจ ก็จะทำให้ควบคุมหน้าเว็บทั้งงานดีไซน์และลูกเล่นต่าง ๆ ได้อย่างสะดวกง่ายดาย

ทั้ง 30 CSS Selectors คือ

  1. *
  2. #X
  3. .X
  4. X Y
  5. X
  6. X:visited and X:link
  7. X + Y
  8. X > Y
  9. X ~ Y
  10. X[title]
  11. X[href="foo"]
  12. X[href*="nettuts"]
  13. X[href^="http"]
  14. X[href$=".jpg"]
  15. X[data-*="foo"]
  16. X[foo~="bar"]
  17. X:checked
  18. X:after
  19. X:hover
  20. X:not(selector)
  21. X::pseudoElement
  22. X:nth-child(n)
  23. X:nth-last-child(n)
  24. X:nth-of-type(n)
  25. X:nth-last-of-type(n)
  26. X:first-child
  27. X:last-child
  28. X:only-child
  29. X:only-of-type
  30. X:first-of-type

ดูรายละเอียดเพิ่มเติมได้ที่ The 30 CSS Selectors you Must Memorize