Parallax scrolling image
Looks like
Code
<style>
.parallax {
/* The image used */
background-image: url("https://www.centralbedfordshire.gov.uk/images/boy_christmas_tree.jpg");
/* Set a specific height */
height: 500px;
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
/* Turn off parallax scrolling for all tablets and phones. Increase/decrease the pixels if needed */
@media only screen and (max-device-width: 1366px) {
.parallax {
background-attachment: scroll;
}
}
</style>
<!-- Container element -->
<div class="parallax"></div>