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
相關文章
相關標籤/搜索