<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><style type="text/css">p:first-child {? color: red;? }?li:first-child {text-transform:uppercase;}</style></head><body><ul><li>Intert Key</li><li>Turn key <strong>clockwise</strong></li><li>Push accelerator</li></ul><p>some text</p></body></html>
3 回答

大黑虎
TA貢獻(xiàn)2條經(jīng)驗(yàn) 獲得超0個(gè)贊
“:first-child”指選擇任何元素的第一個(gè)子元素,ele:first-child{color:red}是指ele是某個(gè)父元素的第一個(gè)元素,而父元素是誰(shuí)不重要,重要的是ele是第一個(gè)子元素
添加回答
舉報(bào)
0/150
提交
取消