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

텍스트의 마지막 줄을 CSS로 정렬

<시간/>

text-align-last 속성은 텍스트의 마지막 줄을 정렬하는 데 사용됩니다. 다음 코드를 실행하여 텍스트의 마지막 줄을 CSS로 정렬할 수 있습니다.

예시

<!DOCTYPE html>
<html>
   <head>
      <style>
         .mydiv {
            text-align-last: right;
         }
      </style>
   </head>
   <body>
      <h1>text-align-last Property</h1>
      <div class = "mydiv">
         <p>This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text. This is demo text.
         This is demo text. This is demo text.</p>
      </div>
   </body>
</html>

출력

텍스트의 마지막 줄을 CSS로 정렬