CSS class priorities

前端 未结 4 1402
深忆病人
深忆病人 2020-12-08 15:13

I have a question about the priority of CSS classes after encountering a problem today. The situation is as follows:

I have an unordered list which has a class assoc

4条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 16:01

    This sounds like a CSS specificity problem. Try changing your .selectedItem ruleset to:

    .dynamicList li.selectedItem {
      background-color: #0000ff;
    }
    

提交回复
热议问题