CSS选择器的演变

2018-09-07  本文已影响0人  妖妖说

css1.0

层叠:
继承 盒模型 列表 浮动

选择器:
元素  #id .class

复合选择器
后台选择器: e f

伪类:
超链接伪类
:link
:visited
:active

伪元素
类别
:first-letter
:first-line

规则
@import

css2.1

定位

选择器:
通用选择器:*

复合选择器:
子代选择器:e>f
相邻同级选择器:e+f
属性选择器:[~attribute]

伪类
动态伪类
:hover
:active
:focus

结构化伪类
:first-child

语言伪类
:lang

伪元素
:before
:after

规则
@fontface
@media
@character
@page

CSS3.0
复合选择器
常规同级选择器:e ~f

属性选择器
指示位置属性选择器
e[attribute='value']
e[attribute~='value']
e[attribute|='value']

伪类
状态伪类
:enabled
:disabled
:checked
:indeterminate

目标伪类
:target

否定伪类
:not(s)

结构化伪类
:nth-child(n)
:nth-last-child(n)
:nth-of-type(n)
:nth-last-of-type(n)
:last-child
:first-of-child
:last-of-child
:first-of-type
:last-of-type
:only-of-type
:only-child
:empty

伪类
(now with::instead of:)

规则
@keyframe

上一篇 下一篇

猜你喜欢

热点阅读