如何制作文字包?

问题描述 投票:-4回答:1

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

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>
css
1个回答
1
投票

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

p {
    word-wrap: break-word;
}
© www.soinside.com 2019 - 2024. All rights reserved.