CSS multiple selectors without comma

后端 未结 2 2021
有刺的猬
有刺的猬 2020-12-06 11:55

I am alittle confuse about CSS Selectors, I understand that we can group multiple css selectors with a comma if they share similar attributes, but what about multiple css se

相关标签:
2条回答
  • 2020-12-06 12:14

    This selects descendants.

    .ui-datepicker-rtl .ui-datepicker-prev will pick all decendants of elements with class ui-datepicker-rtl who have class ui-datepicker-prev

    0 讨论(0)
  • 2020-12-06 12:28

    When you use the comma, like

    #menu, .item
    

    you are saying:

    all elements whose id is menu AND all elements whose class is item

    When you nest selectors without the comma, like

    #menu .item
    

    you are saying

    all elements that has class item inside a container whose id is menu

    0 讨论(0)
提交回复
热议问题