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

CSS를 사용한 이미지의 수직 정렬

<시간/>

CSS를 사용하여 이미지를 세로로 정렬하려면 vertical-align 속성을 사용하십시오. 다음 코드를 실행하여 이미지를 세로로 정렬할 수 있습니다. -

예시

<!DOCTYPE html>
<html>
   <head>
      <style>
         img {
            vertical-align: text-bottom;
         }
      </style>
   </head>
   <body>
      <p>This is <img src = "https://www.tutorialspoint.com/videotutorials/assets/videos/courses/155/images/course_155_image.png" alt000 = "Video Tutorial" width = "200" height = "150"> demo image.</p>
   </body>
</html>