first-child,last-child,nth-child,first-of-type,last-of-type 用法

目录 1. first-child 2. last-child 3. nth-child 4. first-of-type 5. last-of-type   1. first-child 功能是: 选中A元素父元素的第一个为A元素 来看代码 图1中 这样的样式浏览器未发现样式改变 解释下样式: p的first-child的意思是 选中p的父元素中第一个元素是 p的 元素  图1中 p的父元素是b
相关文章
相关标签/搜索