How can I select only first three elements with the :nth-child() selector?
:nth-child()
You can do it like this:
section > figure:nth-child(-n+3) { border: 1px solid; }
1 2 3 4 5 6