CSS :not(:last-child):after selector

前端 未结 8 1815
时光取名叫无心
时光取名叫无心 2020-12-04 05:05

I have a list of elements, which are styled like this:

8条回答
  •  抹茶落季
    2020-12-04 05:18

    You can try this, I know is not the answers you are looking for but the concept is the same.

    Where you are setting the styles for all the children and then removing it from the last child.

    Code Snippet

    li
      margin-right: 10px
    
      &:last-child
        margin-right: 0
    

    Image

提交回复
热议问题