首页 > 解决方案 > 内联列表:您可以在换行符处抑制 li:after 内容吗?

问题描述

通过这个内联列表的最小工作示例,我几乎拥有了我想要的东西:

ul {word-wrap:normal; width:540px;}
ul li {display:inline; white-space:nowrap;}
ul li:after {content:"\2000\22C4\2000";}
ul li:last-child:after {content:none;}
<ul>
    <li>here's some very long list item</li>
    <li>here's some very long list item</li>
    <li>here's some very long list item</li>
</ul>

这不会<li>按预期破坏跨行的内容,但是有没有办法抑制在li:after {content:"...";}换行之前发生的显示?

标签: htmlcsshtml-liststypography

解决方案


推荐阅读