結構性偽類
:nth-child(index)系列
1.:first-child
2.:last-child
3.nth-last-child(index)
4.only-child
:nth-of-type(index)系列
1.first-of-type
2.last-of-type
3.nth-last-type(index)
4.only-of-type
:not偽類
處理導航欄最后一個豎劃線a:not(:last-of-type)
:empty偽類
選中所有內容是空的元素
偽元素選擇器
::before
::after
::firstLetter選中第一個字母
::firstLine選中第一行
::selection當文字被選中時的狀態
css聲明的優先級
選擇器的特殊性
id選擇器0,1,0,0
.選擇器0,0,1,0
屬性選擇器0,0,1,0
元素和偽元素0,0,0,1
通配符選擇器0,0,0,0
結合符對選擇器特殊性沒有一點貢獻
內聯聲明特殊性都是1,0,0,0
繼承沒有特殊性
會累加但是不會進位
用svg生成字體圖標
text-show
filiter:blur()
-webkit-text-strike
white-space:nowrap;
overflow: hidden;
text-overflow:ellipsis;