JSFiddle - React, Tailwind, and code Playground
HTML
<h1>
site with static background
</h1>
this should work on both desktop and mobile
CSS
body::before {
content: '';
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-image: url(https://cdn.pixabay.com/photo/2024/03/14/08/52/pug-8632718_1280.jpg);
z-index: -1;
}
body {
padding-bottom: 2000px;
}