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-x | to repeat images horizontally. |
| repeat-y | to repeat images vertically. |
| no-repeat | this value is used to stop the background image repetition. |
Comments (0)