nth-last-of-type

The nth-last-of-type CSS pseudo-class represents the same elements that would be matched by :nth-last-child(|An+B| of S), where S is a type selector and namespace prefix matching the element in question.

Syntax

selector:nth-last-of-type(An+B)
{
    property: value;
}

Examples

1 · An+B

2 · even

3 · odd

first-child

first-of-type

last-child

last-of-type

nth-child

nth-last-child

nth-of-type

only-child

only-of-type

active

any-link

blank

checked

default

defined

dir

disabled

empty

enabled

first-child

first-of-type

focus

focus-visible

focus-within

fullscreen

has

hover

in-range

indeterminate

invalid

is

lang

last-child

last-of-type

link

local-link

modal

not

nth-child

nth-col

nth-last-child

nth-last-col

nth-of-type

only-child

only-of-type

optional

out-of-range

picture-in-picture

placeholder-shown

read-only

read-write

required

root

scope

target

valid

visited

where

World Wide Web Consortium (W3C)

Home Menu