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

CSS를 사용하여 요소 내부의 공백으로 작업

<시간/>

공백 사용 요소 내부의 공백으로 작업하는 속성

예시

<!DOCTYPE html>
<html>
   <head>
      <style>
         p.demo1 {
            white-space: normal;
         }
         p.demo2 {
            white-space: pre;
         }
      </style>
   </head>
   <body>
      <h2>Control white-space</h2>
      <p class = "demo1">
         This is demo text.
         This is demo text.
      </p>
      <p class = "demo2">
         This is demo text.
         This is demo text.
      </p>
   </body>
</html>