N
N
newhack2020-04-13 13:38:49
css
newhack, 2020-04-13 13:38:49

How to set background for parallax?

In general, you need to do this so that the blocks go along the grid inside on top of the background. Yes, this is definitely parallax, but I need one fixed background, and so that all the blocks float on it without moving anything. Like here approximately, only there is one large block, but I need the blocks to be small and if there was a distance between them, then it was transparent https://7themes.su/
googled this option, but apparently it doesn’t quite fit. https://codepen.io/jaukia/pen/jQEYQQ
there are strange blocks, and bg does not work for html, body is not displayed) website) Does anyone have a bike? What not to invent))

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Lord_Dantes, 2020-04-29
@Lord_Dantes

Add a property to the background.
background-attachment: fixed

V
Vladimir Maistruk, 2020-08-10
@Vladneim

Here is a complete list of how to set the background
.paralax3 {
/* The image used */
background-image: url("../img/1.jpg");
/* Create the parallax scrolling effect */
background-attachment: fixed;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question