How to separate styles in a nested list styling?

前端 未结 4 1989
[愿得一人]
[愿得一人] 2021-01-02 03:21

I have a list and list also has list in it.
I set styles on parent list but I want different styles for parent and child list but they are mixed somehow I can\'t separat

4条回答
  •  借酒劲吻你
    2021-01-02 03:48

    Have you tried CSS child-selectors?

    ul { /* parent list styles here */ }
    ul > li > ul { /* child list styles here */ }
    

提交回复
热议问题