| 1 |
* { |
| 2 |
background-image: none; |
| 3 |
} |
| 4 |
|
| 5 |
button:nth-child(even) { |
| 6 |
background-color: yellow; |
| 7 |
} |
| 8 |
|
| 9 |
button:nth-child(odd) { |
| 10 |
background-color: red; |
| 11 |
} |
| 12 |
|
| 13 |
button:nth-child(first) { |
| 14 |
background-color: purple; |
| 15 |
} |
| 16 |
|
| 17 |
button:nth-child(last):nth-child(even) { |
| 18 |
background-color: lime; |
| 19 |
} |
| 20 |
|
| 21 |
button:nth-child(last):nth-child(odd) { |
| 22 |
background-color: purple; |
| 23 |
} |
| 24 |
|
| 25 |
button:nth-child(last):nth-child(first) { |
| 26 |
background-color: blue; |
| 27 |
} |
| 28 |
|
| 29 |
/* for reference */ |
| 30 |
|
| 31 |
#red { |
| 32 |
background-color: red; |
| 33 |
} |
| 34 |
|
| 35 |
#lime { |
| 36 |
background-color: lime; |
| 37 |
} |
| 38 |
|
| 39 |
#purple { |
| 40 |
background-color: purple; |
| 41 |
} |
| 42 |
|
| 43 |
#yellow { |
| 44 |
background-color: yellow; |
| 45 |
} |
| 46 |
|
| 47 |
#blue { |
| 48 |
background-color: blue; |
| 49 |
} |