獲取子元素

1、純css  獲取子元素 #test1>div {background-color:red;} #test1 div {font-size:14px;} #test1>div:first-child {color:#ccc;} <div id="test1"> <div>性別</div><div>男</div> </div> 因1示例中爲#test1下的子元素 #test1>div 餘#test
相關文章
相關標籤/搜索