CSS3 Selectors

17
CSS3 Selectors BY MURILLO GRUBLER

description

 

Transcript of CSS3 Selectors

Page 1: CSS3 Selectors

CSS3 SelectorsBY MURILLO GRUBLER

Page 2: CSS3 Selectors

Old selectors

*

.class

#id

element

element, element

.class element, elemento, #id

Page 3: CSS3 Selectors

element1~element2

[attribute^=value]

[attribute$=value]

[attribute*=value]

:first-of-type

:last-of-type

:only-of-type

:only-child

:nth-child(n)

:nth-last-child(n)

:nth-of-type(n)

:nth-last-of-type(n)

:last-child

:root

:empty

:target

:enabled

:disabled

:checked

:not(selector)

::selection

New selectors

Page 4: CSS3 Selectors

Element ~ Element

Page 5: CSS3 Selectors

element[attribute^=value]

Page 6: CSS3 Selectors

element[attribute$=value]

Page 7: CSS3 Selectors

element[attribute*=value]

Page 8: CSS3 Selectors

element:first-of-type

Page 9: CSS3 Selectors

element:last-of-type

Page 10: CSS3 Selectors

element:only-of-type

Page 11: CSS3 Selectors

element:only-child

Page 12: CSS3 Selectors

element:nth-child(n)

Page 13: CSS3 Selectors

element:nth-child(2n - 1)Bracket the functions math

Page 14: CSS3 Selectors

element:nth-of-type(2n - 1)

Page 15: CSS3 Selectors

element:last-child (2n - 1)

Page 16: CSS3 Selectors

element:empty

Page 17: CSS3 Selectors

:not(element)