parallax-scroll / style.css
tonyassi's picture
Update style.css
acb6b7b verified
raw
history blame contribute delete
700 Bytes
/* Basic Reset */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Ensure body and html are 100% height */
html, body {
height: 100%;
overflow-x: hidden;
}
/* Container that holds the background images */
.image-container {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
/* Add smooth transition effect for background changes */
transition: background-image 0.2s ease-in-out;
}
/* Ensure the scrollable area is tall enough to allow scrolling */
body {
height: calc(100vh * 12); /* Adjust based on the number of images */
}