亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

child selector

There is also a more useful selector sub-selector, that is, the greater than symbol (>), which is used to select the first-generation child elements of the specified label element. For example, the code in the code editor on the right:

.food>li{border:1px solid red;}

This line of code will add a red solid border to the sub-element li (fruits, vegetables) under the class name food.


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>子選擇符</title> <style type="text/css"> .food>li{border:1px solid red;}/*添加邊框樣式(粗細(xì)為1px, 顏色為紅色的實(shí)線)*/ </style> </head> <body> <p class="first">三年級(jí)時(shí),<span>我還是一個(gè)<span>膽小如鼠</span>的小女孩</span>,上課從來(lái)不敢回答老師提出的問(wèn)題,生怕回答錯(cuò)了老師會(huì)批評(píng)我。就一直沒(méi)有這個(gè)勇氣來(lái)回答老師提出的問(wèn)題。學(xué)校舉辦的活動(dòng)我也沒(méi)勇氣參加。</p> <h1>食物</h1> <ul class="food"> <li>水果 <ul> <li>香蕉</li> <li>蘋果</li> <li>梨</li> </ul> </li> <li>蔬菜 <ul> <li>白菜</li> <li>油菜</li> <li>卷心菜</li> </ul> </li> </ul> </body> </html>
submitReset Code