我已经有以下风格:white-space: pre-wrap;
这允许将换行符视为元素的换行符(并且空格不会折叠)。
现在我想申请text-indent: -40px; padding-left: 40px;
尝试产生这样的东西:
This is a long line of text (or at least, just pretend it is) so it
will indent when it wraps.
Further lines of text appear as normal, but again if they exceed the
maximum width then they wrap and indent.
不幸的是,它并没有达到我的预期:
This is a long line of text (or at least, just pretend it is) so it
will indent when it wraps.
Further lines of text appear as normal, but again if they
exceed the maximum width then they wrap and indent.
CSS中有没有办法缩进换行,但将换行算作新的第一行?