【发布时间】:2014-05-07 08:23:44
【问题描述】:
这里有点菜鸟,但我基本上希望文本在包装时自动缩进。 所以而不是:
Peter piper picked a peck
of pickled peppers.
应该是:
Peter piper picked a peck
of pickled peppers.
这是我尝试过的:
span.profile{ display:block; text-indent: -35px; /*this pulls the first line to the left*/ padding-left:35px; /*this pushes the paragraph to the right*/ padding-right:0px; text-align:justify; }
在此之后,我在整个文本周围添加了span class="profile" 标签,但问题是我希望它在每个换行符后“重置”。有没有办法让它做到这一点?
感谢您的帮助!
【问题讨论】:
-
选择目标语言会很好...此外,我们是来帮助您的,而不是为您编写代码。那么到目前为止,您尝试过什么?
-
对不起,这很公平。最好我想使用CSS。我试过设置大于边距的填充,但就像我说的我不是真正的编码专家......
-
@computerfreaker 好的,所以我只是尝试了这个
span.profile{ display:block; text-indent: -35px;/*this pulls the first line to the left*/ padding-left:35px;/*this pushes the paragraph to the right*/ padding-right:0px; text-align:justify;在此之后,我在整个文本周围添加了 span="profile" 标记,但问题是我希望它在每次之后“重置”越线。有没有办法让它做到这一点? -
我自己并不精通 CSS(我只是在玩
text-align和text-indent的简单组合),但我只是编辑了您的帖子以使其更清晰一些其他人也许能提供更好的帮助。 -
@computerfreaker 不用担心,感谢您的帮助!
标签: css text formatting