:first-child

Color Prioritization

All color contrast issues need to be addressed. But some issues can be prioritized with project managers. Obvious changes, for instance older pages that still have grey on grey links in the footer, can be updated without much challenge. This is especially true if the older pages do not meet updated color palettes.


Simply Unreadable Text

Anything less than 2:1 is unacceptable and needs to be prioritized. Even if it represents a disabled element. This content is not readable.

Content that falls between 2:1 and 3:1 requires design justification. For instance, it is a disabled button or placeholder text. If the design needs to be updated if there’s insufficient justification.

Start a conversation

Determine why content uses something between 3:1 and 4:1.

  • Is it a heading?
  • Is it disabled?
  • Is it an icon or logo?
  • Because that’s what others are doing?

There are valid reasons for this contrast, but check to see what needs updating.

Why is contrast between 4:1 and 4.5:1? In many ways, these are the elements that take the longest to fix. Focus on what causes this and how they can be updated:

  • A branding color that didn’t consider accessibility
  • An adequate link color that fails when on a background color
  • A background gradient
  • A color that doesn’t meet the color palette

CSS Reference

CSS ReferenceCSS Browser SupportCSS SelectorsCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Entities

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function

backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside

caption-side caret-color @charset clear clip clip-path color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor

direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight

grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows

hanging-punctuation height hyphens @import isolation justify-content @keyframes left letter-spacing

line-height list-style list-style-image list-style-position list-style-type

margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width mix-blend-mode

object-fit object-position opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y

padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes

resize right

scroll-behavior

tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top

transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function

unicode-bidi user-select

vertical-align visibility

white-space width word-break word-spacing word-wrap writing-mode

z-index

浏览器兼容性

The compatibility table on this page is generated from structured data. If you’d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Update compatibility data on GitHub

Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
Chrome Full support 4 Edge Full support 12 Firefox Full support 3.5 IE Full support 9 Opera Full support 9 Safari Full support 3.2 WebView Android Full support ≤37 Chrome Android Full support 18 Firefox Android Full support 4 Opera Android Full support 10.1 Safari iOS Full support 3.2 Samsung Internet Android Full support 1.0
Matches elements with no parent Chrome Full support 57 Edge Full support 79 Firefox Full support 52 IE No support No Opera Full support 44 Safari No support No WebView Android Full support 57 Chrome Android Full support 57 Firefox Android Full support 52 Opera Android Full support 43 Safari iOS No support No Samsung Internet Android Full support 7.0
syntax Chrome No support No Notes Edge No support No Notes Firefox No support No Notes IE No support No Opera No support No Safari Full support 9 WebView Android No support No Chrome Android No support No Firefox Android No support No Notes Opera Android No support No Safari iOS Full support 9 Samsung Internet Android No support No

Compatibilidad con navegadores

The compatibility table on this page is generated from structured data. If you’d like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.

Update compatibility data on GitHub

Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome para Android Firefox para Android Opera para Android Safari en iOS Samsung Internet
Chrome Soporte completo 4 Edge Soporte completo 12 Firefox Soporte completo 3.5 IE Soporte completo 9 Opera Soporte completo 9 Safari Soporte completo 3.2 WebView Android Soporte completo ≤37 Chrome Android Soporte completo 18 Firefox Android Soporte completo 4 Opera Android Soporte completo 10.1 Safari iOS Soporte completo 3.2 Samsung Internet Android Soporte completo 1.0
Matches elements with no parent Chrome Soporte completo 57 Edge Soporte completo 79 Firefox Soporte completo 52 IE Sin soporte No Opera Soporte completo 44 Safari Sin soporte No WebView Android Soporte completo 57 Chrome Android Soporte completo 57 Firefox Android Soporte completo 52 Opera Android Soporte completo 43 Safari iOS Sin soporte No Samsung Internet Android Soporte completo 7.0
syntax Chrome Sin soporte No Notas Edge Sin soporte No Notas Firefox Sin soporte No Notas IE Sin soporte No Opera Sin soporte No Safari Soporte completo 9 WebView Android Sin soporte No Chrome Android Sin soporte No Firefox Android Sin soporte No Notas Opera Android Sin soporte No Safari iOS Soporte completo 9 Samsung Internet Android Sin soporte No

CSS Reference

CSS ReferenceCSS Browser SupportCSS SelectorsCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Entities

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function

backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside

caption-side caret-color @charset clear clip clip-path color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor

direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight

grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows

hanging-punctuation height hyphens @import isolation justify-content @keyframes left letter-spacing

line-height list-style list-style-image list-style-position list-style-type

margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width mix-blend-mode

object-fit object-position opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y

padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes

resize right


scroll-behavior

tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top

transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function

unicode-bidi user-select

vertical-align visibility

white-space width word-break word-spacing word-wrap writing-mode

z-index

Sintaxis

La pseudo-clase se especifica con un solo argumento, que representa el patrón para los elementos coincidentes, contando desde el final.

Valores de palabras clave

Representa elementos cuya posición numérica en una serie de hermanos es impar: 1, 3, 5, etc., contando desde el final.
Representa elementos cuya posición numérica en una serie de hermanos es par: 2, 4, 6, etc., contando desde el final.

Notación funcional

Representa elementos cuya posición numérica en una serie de hermanos coincide con el patrón , para cada entero positivo o valor cero de . El índice del primer elemento, contando desde el final, es . Los valores y deben ser ambos .

Where do we go from here?

Make it Simple

Apple Watch Detection

The Apple Watch contains two features that require no user input. The watch can detect irregular heartbeats and falls. In fact, not interacting with the screen is an interaction, for the fall monitoring it will send a request for help.

QuickBooks Mileage Tracking

QuickBooks Mobile app creates mileage reports. Simply give it location permission and it tracks start, finish, mileage, and provides potential expense deductions. You can be the driver or passenger. The average users finds 37% more expense deductions.

Make it Work

Seeing AI by Microsoft

Seeing AI is a great app from Microsoft. But much of it’s functionality, including: object detection, barcode scanner, facial recognition, and currency identification, can also be found with OrCam, Lookout, and other applications. But SeeingAI has a feature that makes it easier for people to successfully scan product barcodes. It uses AI to scan the object and detect the barcode before it is completely visible. It then gives audio directions to rotate the object until it can scan the code. 

Safe Exit for All

Researchers at Wichita State University have developed Safe Exit For All. It’s an emergency exit navigation system which dynamically adjusts for danger zones. It provides customized directions based on the user’s disability, such as mobility or vision

Make it Affordable

Detecting Dyslexia and Autism

Change Dyslexia’s Dytective game can detect a child’s risk of having dyslexia. A collaboration of researchers in Europe have created a method to diagnose autism by tracking the person’s eye movements within a web page. These AI-driven tools allow earlier diagnosis and treatment with minimal costs.


Independent Developers

Satya Panda and Dr. Bindu Sravani Nayak used open-source machine learning libraries and affordable data servers to create an application that can differentiate oral diseases based on multiple factors and simplify the process of diagnosis and treatment. This allows dentists to see more patients and increase treatment efficacy.They are an example of the democratization of ML/AI and niche projects that can be built by everyone.

Make it for Everyone

QuickBooks Capital

Unconscious bias is a significant barrier to small business funding. QuickBooks Capital analyzes 26 billion transactions and data points to provide loans based on a business’s ability to repay. 60% of customers say they didn’t qualify for loans before QuickBooks Capital.

Android Live Transcribe

Android’s Live Transcribe brings live captioning to Android phones. It supports 70 languages and uses the device’s neural network to complete the speech to text transcription without being dependent on a network connection. Google has also introduced sound detection and archived transcriptions. They also recently open sourced the project to encourage transcription integration in more products.

Make it Awesome

Indoor Navigation via computer vision

Smith-Kettlewell Institute is researching the use of computer vision to provide indoor navigation without architectural additions, such as blue-tooth beacons. The project uses a combination of building layout drawings and recognizable landmarks, such as exit signs. It uses the phone’s camera and AI to determine the person’s location and to give step by step directions.

Clew is an app that uses computer vision to creat path tracing. A person would be guided from to a location. For instance going from a meeting room to the restroom. The mobile device would record the landmarks and create a path to lead the person back to their original starting point.

Voice Recognition for everyone

Mozilla’s Common Voice is an initiative to teach machines how real people speak. Volunteers are building a giant data set of voice recordings from all accents, languages, and speech ability. VoiceITT and Google’s Project Euphonia are focusing specifically on understanding dysarthric speech.

CSS Reference

CSS ReferenceCSS Browser SupportCSS SelectorsCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Entities

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function

backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside

caption-side caret-color @charset clear clip clip-path color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor

direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight

grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows

hanging-punctuation height hyphens @import isolation justify-content @keyframes left letter-spacing

line-height list-style list-style-image list-style-position list-style-type

margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width mix-blend-mode

object-fit object-position opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y

padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes

resize right


scroll-behavior

tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top

transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function

unicode-bidi user-select

vertical-align visibility

white-space width word-break word-spacing word-wrap writing-mode

z-index

Exemples

Exemples

nth-last-child
Permettra de cibler les quatre dernières lignes d’un tableau.
ou
Permettra de cibler tous les éléments pairs en partant de la fin.

Exemple appliqué

table {
  border:1px solid blue;
}
tr:nth-last-child(-n+3) { /* les trois derniers enfants */
  background-color: lime;
}

HTML

<table>
  <tbody>
    <tr>
      <td>Première ligne</td>
    </tr>
    <tr>
       <td>Deuxième ligne</td>
    </tr>
    <tr>
       <td>Troisième ligne</td>
    </tr>
    <tr>
       <td>Quatrième ligne</td>
    </tr>
    <tr>
       <td>Sixième ligne</td>
    </tr>
  </tbody>
</table>

Cas aux limites

commence à zéro et le dernier élément commence à un, et sélectionnent donc les mêmes éléments.

HTML

<table>
  <tbody>
    <tr>
      <td>Première ligne</td>
    </tr>
    <tr>
      <td>Deuxième ligne</td>
    </tr>
    <tr>
      <td>Troisième ligne</td>
    </tr>
  </tbody>
</table>
tr:nth-last-child(n) {
  background-color: lightgray;
}

tr:nth-last-child(n+1){
  font-weight: 600;
}

Mise en forme selon le nombre d’éléments

Il est possible d’utiliser les compteurs pour mettre en forme une liste selon le nombre d’éléments qu’elle contient. Dans l’exemple qui suit, on met les éléments de la liste en rouge si celle-ci contient au moins trois éléments. Pour cela, on combine la pseudo-classe et le sélecteur de voisins généraux (general sibling combinator).

HTML

<h4>Une liste avec quatre éléments :</h4>
<ol>
  <li>Un</li>
  <li>Deux</li>
  <li>Trois</li>
  <li>Quatre</li>
</ol>

<h4>Une liste avec deux éléments :</h4>
<ol>
  <li>Un</li>
  <li>Deux</li>
</ol>

Поддержка браузерами

Update compatibility data on GitHub

Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome для Android Firefox для Android Opera для Android Safari on iOS Samsung Internet
Chrome Полная поддержка 1 Edge Полная поддержка 12 Firefox Полная поддержка 3.5 IE Полная поддержка 9 Opera Полная поддержка 9.5 Замечания Safari Полная поддержка 3.1 WebView Android Полная поддержка ≤37 Chrome Android Полная поддержка 18 Firefox Android Полная поддержка 4 Opera Android Полная поддержка 10.1 Замечания Safari iOS Полная поддержка 3.1 Samsung Internet Android Полная поддержка 1.0
Matches elements with no parent Chrome Полная поддержка 57 Edge Полная поддержка 79 Firefox Полная поддержка 52 IE Нет поддержки Нет Opera Полная поддержка 44 Safari Нет поддержки Нет WebView Android Полная поддержка 57 Chrome Android Полная поддержка 57 Firefox Android Полная поддержка 52 Opera Android Полная поддержка 43 Safari iOS Нет поддержки Нет Samsung Internet Android Полная поддержка 7.0
syntax Chrome Нет поддержки Нет Замечания Edge Нет поддержки Нет Замечания Firefox Нет поддержки Нет Замечания IE Нет поддержки Нет Opera Нет поддержки Нет Safari Полная поддержка 9 WebView Android Нет поддержки Нет Chrome Android Нет поддержки Нет Firefox Android Нет поддержки Нет Замечания Opera Android Нет поддержки Нет Safari iOS Полная поддержка 9 Samsung Internet Android Нет поддержки Нет

示例

选择器示例

 or 
表示HTML表的倒数的奇数行:1、3、5等。
 or 
表示HTML表的倒数的偶数行:2、4、6等。
表示倒数第7个元素。
表示倒数的第5、10、15等元素。
表示倒数的第4、7、10、13等元素。
表示一组兄弟节点中的最后三个元素。
 or 
表示一组兄弟节点中的每个元素。这与一个简单的选择器相同。(由于从0开始,而最后一个元素从1开始,和都会选择相同的元素。)
 or 
表示所有处于兄弟节点中倒数第一位的元素。这与选择器相同。

Table example

HTML

<table>
  <tbody>
    <tr>
      <td>First line</td>
    </tr>
    <tr>
       <td>Second line</td>
    </tr>
    <tr>
       <td>Third line</td>
    </tr>
    <tr>
       <td>Fourth line</td>
    </tr>
    <tr>
       <td>Fifth line</td>
    </tr>
  </tbody>
</table>

CSS

table {
  border: 1px solid blue;
}

/* Selects the last three elements */
tr:nth-last-child(-n+3) {
  background-color: pink;
}

/* Selects every element starting from the second to last item */
tr:nth-last-child(n+2) {
  color: blue;
}

/* Select only the last second element */
tr:nth-last-child(2) {
  font-weight: 600;
}

HTML

<h4>A list of four items (styled):</h4>
<ol>
  <li>One</li>
  <li>Two</li>
  <li>Three</li>
  <li>Four</li>
</ol>

<h4>A list of two items (unstyled):</h4>
<ol>
  <li>One</li>
  <li>Two</li>
</ol>

CSS

/* If there are at least three list items,
   style them all */
li:nth-last-child(n+3),
li:nth-last-child(n+3) ~ li {
  color: red;
}

Syntax

The pseudo-class is specified with a single argument that describes a pattern for matching element indices in a list of siblings. Element indices are 1-based.

Keyword values

Represents elements whose numeric position in a series of siblings is odd: 1, 3, 5, etc.
Represents elements whose numeric position in a series of siblings is even: 2, 4, 6, etc.

Functional notation

Represents elements in a list whose indices match those found in a custom pattern of numbers, defined by , where: is an integer step size, is an integer offset, is all positive integers, starting from 0.
It can be read as the An+Bth element of a list.

CSS Reference

CSS ReferenceCSS Browser SupportCSS SelectorsCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Entities

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function

backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside

caption-side caret-color @charset clear clip clip-path color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor

direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight

grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows

hanging-punctuation height hyphens @import isolation justify-content @keyframes left letter-spacing

line-height list-style list-style-image list-style-position list-style-type

margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width mix-blend-mode

object-fit object-position opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y

padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes

resize right

scroll-behavior

tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top

transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function

unicode-bidi user-select

vertical-align visibility

white-space width word-break word-spacing word-wrap writing-mode

z-index

Property Values

Value Description Play it
auto Default value. The last line is justified and aligned left Play it »
left The last line is aligned to the left Play it »
right The last line is aligned to the right Play it »
center The last line is center-aligned Play it »
justify The last line is justified as the rest of the lines Play it »
start The last line is aligned at the beginning of the line (left if the text-direction is left-to-right, and right is the text-direction is right-to-left) Play it »
end The last line is aligned at the end of the line (right if the text-direction is left-to-right, and left is the text-direction is right-to-left) Play it »
initial Sets this property to its default value. Read about initial Play it »
inherit Inherits this property from its parent element. Read about inherit

CSS Reference

CSS ReferenceCSS Browser SupportCSS SelectorsCSS FunctionsCSS Reference AuralCSS Web Safe FontsCSS AnimatableCSS UnitsCSS PX-EM ConverterCSS ColorsCSS Color ValuesCSS Default ValuesCSS Entities

CSS Properties

align-content align-items align-self all animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function

backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside

caption-side caret-color @charset clear clip clip-path color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor

direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font @font-face font-family font-feature-settings font-kerning font-size font-size-adjust font-stretch font-style font-variant font-variant-caps font-weight

grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows

hanging-punctuation height hyphens @import isolation justify-content @keyframes left letter-spacing

line-height list-style list-style-image list-style-position list-style-type

margin margin-bottom margin-left margin-right margin-top max-height max-width @media min-height min-width mix-blend-mode

object-fit object-position opacity order outline outline-color outline-offset outline-style outline-width overflow overflow-x overflow-y

padding padding-bottom padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes

resize right

scroll-behavior

tab-size table-layout text-align text-align-last text-decoration text-decoration-color text-decoration-line text-decoration-style text-indent text-justify text-overflow text-shadow text-transform top

transform transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function

unicode-bidi user-select

vertical-align visibility

white-space width word-break word-spacing word-wrap writing-mode

z-index

Ejemplos

Selectores de ejemplo

Representa las filas impares de una tabla HTML: 1, 3, 5, etc., contando desde el final.
Representa las filas pares de una tabla HTML: 2, 4, 6, etc., contando desde el final.
Representa el séptimo elemento, contando desde el final.
Representa los elementos 5, 10, 15, etc., contando desde el final.
Representa los elementos 4, 7, 10, 13, etc., contando desde el final.
Representa los últimos tres elementos entre un grupo de hermanos.
Representa cada elemento entre un grupo de hermanos. Esto es lo mismo que un simple selector . 
or
Representa cada que es el primer elemento entre un grupo de hermanos, contando desde el final. Esto es lo mismo que el selector . 

Ejemplo de tabla

HTML

<table>
  <tbody>
    <tr>
      <td>Primera línea</td>
    </tr>
    <tr>
      <td>Segunda línea</td>
    </tr>
    <tr>
      <td>Tercera línea</td>
    </tr>
    <tr>
      <td>Cuarta línea</td>
    </tr>
    <tr>
      <td>Quinta línea</td>
    </tr>
  </tbody>
</table>
table {
  border: 1px solid blue;
}

/* Selecciona los últimos tres elementos */
tr:nth-last-child(-n+3) {
  background-color: pink;
}

/* Toma todos los elementos a partir del penúltimo elemento */
tr:nth-last-child(n+2) {
  color: blue;
}

/* Seleccione solo el penúltimo elemento */
tr:nth-last-child(2) {
  font-weight: 600;
}

HTML

<table>
  <tbody>
    <tr>
      <td>Primera línea</td>
    </tr>
    <tr>
      <td>Segunda línea</td>
    </tr>
    <tr>
      <td>Tercera línea</td>
    </tr>
  </tbody>
</table>

С этим читают