Hey. I can not figure out the formula required for the selection of elements:
1,4,7 2,5,8 3,6,9
I tried to do 1n, 2n и 3n and 1n+3, 2n+3, 3n+3 , but it did not work.
1n, 2n и 3n
1n+3, 2n+3, 3n+3
li { color: #000; } li:nth-child(3n-2) { color: red; } li:nth-child(3n-1) { color: blue; }
<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> </ul>
Source: https://ru.stackoverflow.com/questions/691933/More articles:How to correctly pick up cookies placed in the test using jsdom?background at user control wpfPug compiles html in one lineSet up an Azure server for SignalRHow to write to an object property an array of objects, where the values will be the values of the array?Empty cell in flexboxHow to check if the file is open now? .NETPHP streaming large audio fileContent parser on Wordpress siteMPEG-DASH VOD Generation with audio and video from a single .webm fileAll Articles