Declaring CSS rules to apply only to a particular class

前端 未结 4 1553
小鲜肉
小鲜肉 2021-01-19 15:14

I have the following CSS I need to apply to only a particular div (because of conflicts):

The div in question has the class name datepicker-days. Do I declare the be

4条回答
  •  [愿得一人]
    2021-01-19 15:55

    Just use the descendant selector:

    .datepicker-days table {
        /* this rule will only apply to `` elements that are descendents of any element with class "datepicker-days" */
    }
    

    提交回复
    热议问题