常见伪类---- :hover, :link, :active, :target, :not(), :focus
常见伪元素---- :first-letter, ::first-line, ::before, ::after, ::selection
one. ::before和 ::after
1. ::before和 ::after 的特有属性content,在css渲染中向元素逻辑上的头部或者尾部添加内容。这些添加不会出现在DOM中,不会改变文档的内容,所以不要用::before 或 ::after 展示有实际意义的内容,尽量使用它们修饰内容,例如图标。
content属性:
用content来指定插入内容,content必须有值,至少为空。
默认情况下,伪类元素的display是默认inline,可通过display:block来改变其显示。
html特殊字符的html,js,css写法汇总:
http://www.cnblogs.com/starof/p/4718550.html
two. hover
鼠标移入元素改变元素样式。