CSSѡȡڼǩԪأnth-childfirst-childlast-child
ǰλãҳ > վά > б

CSSѡȡڼǩԪأnth-childfirst-childlast-child

ԴһƼʱ䣺2018/5/30 ؼʣϺҳ Ϻվ
1first-childfirst-childʾѡбеĵһǩ£li:first-child{background:#090}˼ǣliбеĵһliģıɫ2last-childlast-childʾѡбе

<a href=../tags/shanghaiwangyesheji/index.html><strong>Ϻҳ</strong></a>

1first-child

first-childʾѡбеĵһǩ£

li:first-child{background:#090}˼ǣli бе һliģıɫ

2last-child

last-childʾѡбеһǩ£li:last-child{background:#090}

3nth-child(3)

ʾѡбеĵ3ǩ£li:nth-child(3){background:#090}е3ҲԸij֣45ȡѡڼǩд

4nth-child(2n)

ʾѡбеżǩѡ 246 ǩ

5nth-child(2n-1)

ʾѡбеǩѡ 1357ǩ

6nth-child(n+3)

ʾѡбеıǩӵ3ʼ

7nth-child(-n+3)

ʾѡбеıǩ03С3ıǩ

8nth-last-child(3)

ʾѡбеĵ3ǩ

˴վάѻˣ

վά

Ŀ

վ

վ

ͨSEOŻ,ṩչʾ,׼ѯ̣ÿͻ20%

ֻվ

ֻվ

ֻվʱǿϮӮȫӪʱֻ+˫赣̻ˮ©

վά

վά

һõվҪڻ򲻶ڵظݣܲϵߣӷ

Ӫ

Ӫ

Ϊ˽άʹƷƣԼǿͻϵƷƽмƻʵʩͼලһϵӪ

ԤԼվ
ṩվŻ
ȡؼ