I need to fit a background URL into a seamless pattern using just CSS/HTML.
To get this done, I am trying to apply a property like margin (negative) to make background URL image overlap each other on repeat.
I am using a DIV element right now, applying a negative margin on this element itself just affect the element, not the background URL image.
Any ideas how to solve this?
Current code on HTML
<body>
<div class="bg"></div>
</body>
Current code on CSS
<style>
.bg{
background: url('./pattern.png');
background-size: 600px;
width: 100vw;
height: 100vh;
}
</style>
Render result of the code above:
Thanks in advance.