so I'm trying to achieve parallax scrolling with just css3. I've stuck to the w3schools tutorial but my image isn't displaying on my web page. here is my HTML:
<!--Main Content-->
<main>
<div class="parallaxBG">
</div>
</main>
and here is my CSS:
.parallaxBG {
background-image: url("Resources/Images/2018-01-03_17.07.41.png");
height: 100%;
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
can anyone answer?
bodyandhtmlset toheight: 100%;also? If not, your div won't have any height without anything inside it.