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
||
子选择符

三年级时,我还是一个胆小如鼠的小女孩,上课从来不敢回答老师提出的问题,生怕回答错了老师会批评我。就一直没有这个勇气来回答老师提出的问题。学校举办的活动我也没勇气参加。

食物

  • 水果
    • 香蕉
    • 苹果
  • 蔬菜
    • 白菜
    • 油菜
    • 卷心菜
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!