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

CSS로 배경 이미지를 한 번만 표시

<시간/>

background-repeat 사용 속성은 배경 이미지를 한 번만 표시합니다. 다음 코드를 실행하여 background-repeat를 구현할 수 있습니다. 속성 -

예시

<!DOCTYPE html>
<html>
   <head>
      <style>
         body {
            background-image: url("https://www.tutorialspoint.com/videotutorials/images/tutor_connect_home.jpg");
            background-repeat: no-repeat;
         }
      </style>
   </head>
   <body>
      <h1>Background Image</h1>
   </body>
</html>