Actually it is necessary that the background image is taken from the html code and not the background from the css, how to make it adaptive? I tried to give absolute positioning, but nothing happened. Did this:

position: absolute; width: 100%; min-height: 400px; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; background-size: cover; 

In general, I am doing a landing, I made an adaptive background in css, everything was fine, but it was necessary that the picture could be changed in the html code.

1 answer 1

The easiest way to change the image in the background through inline styles.

 <div style="background-image: url('path');"></div>