Web Tools Table Maker3schools TranslateImage CompressorFavicon Icon GeneratorCrop & Resize Image
Apu
Apu December 13, 2022 › #css #property

Which property is used in CSS to control the repetition of an image in the background?

To control the repetition of an image in the background, the CSS background-repeat property is used.

<html>
   <head>
      <style>
         body{
            background-image: url("https://app.3schools.in/logo.png");
            background-repeat:repeat;
         }
      </style>
   </head>
   <body>
      <p>This is a paragraph.</p>
   </body>
</html>

The background-repeat property has four valid values that you can use to control the repetition of an image.

repeat to repeat images vertically and horizontally.
repeat-xto repeat images horizontally.
repeat-yto repeat images vertically.
no-repeat this value is used to stop the background image repetition.
save
listen
AI Answer
Write Your Answer
loading
back
View All