最后一个不加伪类:
ul li:not(:last-child)::after { content: ''; height: 14px; border: 1px solid #3c423f; position: absolute; top: 4px; right: 0;}