Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use selector nth-child () and nth-of-type () in css

Shulou Source: shulou.com Published: 2022-06-03 11:01:17 11月15日 Update

Editor to share with you how to use the selector nth-child () and nth-of-type () in css. I hope you will get something after reading this article. Let's discuss it together.

1. Support for nth-child () and nth-of-type ()

All major browsers support: nth-child () and: nth-of-type () selectors, except for IE8 and earlier versions.

General usage of: nth-child () and: nth-of-type ()

1.: nth-child (x); select the element of x

2. N-fold elements of nth-child (x, n) x

3. Nth-child (naughx); select the element = > x

4.: nth-child (- naughx) Select =

Tags: Selection element tag front end code time pattern article support different mainstream usage multiple even sibling name odd done that is that is to say Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL Shulou Technology Redmi Shulou Information MariaDB