Is there a way to select child elements in sequence?
For instance:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
<li>16</li>
<li>17</li>
<li>18</li>
<li>19</li>
<li>20</li>
<li>21</li>
<li>22</li>
<li>23</li>
</ul>
The goal is to select these child elements in the following order:
2 3 6 7 10 11 14 15 18 19 22 23
I am attempting to choose the first even number, followed by the next number, and then after two numbers select the next even number and its consecutive number. |
How can this be achieved using CSS?