Computer >> 컴퓨터 >  >> 프로그램 작성 >> CSS

CSS 자동 줄 바꿈 속성

<시간/>

줄바꿈 속성은 줄을 끊고 다음 줄로 줄 바꿈하는 데 사용됩니다.

예시

다음은 샘플 구문을 보여줍니다 -

<!DOCTYPE html>
<html>
   <head>
      <style>
         div {
            width: 200px;
            border: 2px solid #000000;
         }
         div.b {
            word-wrap: break-word;
         }
      </style>
   </head>
   <body>
      <h2>word-wrap: break-word property</h2>
      <div class = "b"> ThisisdemotextThisisdemotext:
      thisisaveryveryveryveryveryverylongword. The long word wraps to
      the next line.</div>
   </body>
</html>

출력

CSS 자동 줄 바꿈 속성