I am looking to achieve a full-screen background image using HTML and CSS. I have configured all the necessary properties for the background image.
Here is where my background image is located: [![enter image description here][1]][1]
I have attempted to accomplish this by following the code below:
<style>
* {
margin: 0;
padding: 0;
}
.background-image {
background-image: url("https://via.placeholder.com/100.jpg");
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
background-size: cover;
height: 100vh;
width: 100%;
}
</style>
<body>
<div class="background-image"></div>
</body>
However, I am facing an issue where part of the top section of the background image is getting hidden or cut off. I want the entire background image to be displayed in full-screen without any cropping at the top. Does anyone have suggestions on how to rectify this?