Background No Repeat | Images
To avoid the background image from repeating itself, set the background-repeat
property to no-repeat
.
<style>
body {
background-image: url('cat.jpg');
background-repeat: no-repeat;
}
</style>
<!DOCTYPE html>
<html>
<head>
<title>Background No Repeat</title>
</head>
<body>
<h2>Background No Repeat</h2>
<p>You can avoid the image from being repeated by setting the background-repeat property to "no-repeat".</p>
</body>
</html>