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

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

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

相关标签:
8条回答
  • 2020-12-04 05:30

    An example using CSS

      ul li:not(:last-child){
            border-right: 1px solid rgba(153, 151, 151, 0.75);
        }
    
    0 讨论(0)
  • 2020-12-04 05:32

    Your example as written works perfectly in Chrome 11 for me. Perhaps your browser just doesn't support the :not() selector?

    You may need to use JavaScript or similar to accomplish this cross-browser. jQuery implements :not() in its selector API.

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