第十三章 CSS3选择器

 提倡样式与元素绑定,避免混乱
 属性选择器:
 [id=xx] [id^=xx] [id$=xx] [id*=xx]
 伪元素选择器:
:first-letter/first-line/before/after

结构性伪类选择器:
:root/not/empty/target/
结构性伪元素选择器:
:first-child/last-child/nth-child/nth-last-child
:nth-child(num|even|odd)/nth-last-child(num|even|odd)
:nth-child(an+b)/nth-last-child(an+b)//循环选择器
:nth-of-type/nth-last-of-type //同类元素
:only-child

UI元素状态选择器
:hover/active(按下)/focus(输入框获得插入点)
:enabled/disabled/read-only/read-write
: check/default(默认选中的项,反选后仍有效)/indeterminate(都未选择时)
: selection元素被选中时的样式
div ~ p  div之后出现的所有兄弟p

posted @ 2012-03-15 22:26  wuhao12  阅读(99)  评论(0编辑  收藏  举报