Horje
How to create HTML Background with no Repeat

To avoid the background image from repeating itself, set the background-repeat property to no-repeat.


Full Example of HTML Background with no Repeat

Add following line on existence CSS background-repeat: no-repeat;
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-image: url('https://itupto.com/avatar.png');
  background-repeat: no-repeat;
}
</style>
</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>

Output should be:

Full Example of HTML Background with no Repeat





Category:
Web Tutorial
Sub Category:
HTML Background Images
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference