Answers for "css pseudo nth-of-type"

CSS
1

css nth of type

/* Selects every fourth <p> element
   among any group of siblings */
p:nth-of-type(4n) {
  color: lime;
}
Posted by: Guest on October-12-2021
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