Guest User

Untitled

a guest
Jun 30th, 2012
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. Using CSS :even and :odd pseudo-classes with list items
  2. li { color: blue }
  3. li:nth-child(odd) { color:green }
  4. li:nth-child(even) { color:red }
  5.  
  6. li:nth-child(even) {
  7. color:green;
  8. }
  9.  
  10. li:nth-child(odd) {
  11. color:red;
  12. }
  13.  
  14. li { color:blue; }
  15. li:nth-child(odd) { color:green; }
  16. li:nth-child(even) { color:red; }
Advertisement
Add Comment
Please, Sign In to add comment