Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
好的,我想要的是:当 <p> 标签以 </p> 结尾时,我想在行尾添加一个字符。例如
<p>Something and more!</p>
应该看起来像
还有更多!_
其中“_”(下划线)是添加的字符。 这可能与 CSS 吗? 是否也可以在行尾?
是的,有可能
p:after{ content:"_"; }
如果我正确理解了您的问题,那么我认为以下内容可以满足您的要求:
p:after { content: '_'; }
JS 小提琴演示。
这似乎与IE 8 及更高版本兼容。
您可以使用伪类:after:
:after
但不可能对每一行都适用,因为 CSS 实际上不知道“行”。