国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

Contains (descendant) selectors

Contains a selector, that is, adding spaces, which is used to select descendant elements under the specified label element. For example, the code in the code editor on the right:

.first span{color:red;}

This line of code will make the "cowardly" in the first paragraph of text "Rat" font color changes to red.

Please note the difference between this selector and a child selector. A child selector only refers to its direct descendants, or you can understand it as the first generation descendants that act on child elements. The descendant selector acts on all child descendant elements. Descendant selectors select with spaces, while child selectors select with ">".

Summary: > Acts on the first generation descendants of the element, and spaces act on all descendants of the element.


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>后代選擇器</title> <style type="text/css"> .first span{color:red;} .food>li{ border:1px solid red;/*添加邊框樣式(粗細(xì)為1px, 顏色為紅色的實(shí)線)*/ } </style> </head> <body> <p class="first">三年級(jí)時(shí),我還是一個(gè)<span>膽小如鼠</span>的小女孩,上課從來不敢回答老師提出的問題,生怕回答錯(cuò)了老師會(huì)批評(píng)我。就一直沒有這個(gè)勇氣來回答老師提出的問題。學(xué)校舉辦的活動(dòng)我也沒勇氣參加。</p> <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