如何制作文字包?

时间:2018-03-05 21:36:03

标签: css

现在我的文字看起来像这样,走出容器。 如何让它留在容器内并分成单独的线?

Image of what the code produced before I fixed it.

<div class="container Me" style="display: block;">
  <img src="images/me.jpg" alt="Me">
  <div class="content">
    <p class="name">Me</p>
    <p>hello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello worldhello world</p>
    <i class="material-icons reply">reply</i>
    <span class="time">4:46</span>
  </div>
</div>

1 个答案:

答案 0 :(得分:1)

您必须在css中更改自动换行属性:

p {
    word-wrap: break-word;
}