css 文字折り返し





成果物


成果物

index.html


index.html
<!DOCTYPE html>
<html lang="jp">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>文字折り返し</title>

    <style>
      p {
        word-wrap: break-word;
      }
    </style>
  </head>
  <body>
    <div style="margin: 0 auto; width: 250px;background: red;">
      <p>
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      </p>
    </div>
  </body>
</html>


ホームへ