Answers for "nth-of-type selector"

CSS
0

nth-of-type(2):before

p:nth-of-type(2) ==> Selects every <p> element that is the second p element of its parent:

Example
Specify a background color for every <p> element that is the second p element of its parent:

p:nth-of-type(2) {
  background: red;
}
Posted by: Guest on September-18-2021

Browse Popular Code Answers by Language