Horje
How to create HTML Background Repeat

If the background image is smaller than the element, the image will repeat itself, horizontally and vertically, until it reaches the end of the element:


Full Example of HTML Background Repeat

index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-image: url('https://itupto.com/avatar.png');
}
</style>
</head>
<body>

<h2>Background Repeat</h2>

<p>By default, the background image will repeat itself if it is smaller than the element where it is specified, in this case the body element.</p>

</body>
</html>

Output should be:

Full Example of HTML Background Repeat





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


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