There is a task when changing the screen to 320px to change the picture, how to do it correctly There is a cap and the picture should be displayed in HTML not through css For example, there is such a construction
.header { min-height: 100vh; background-size: cover; background-position: center; position: relative; } <header class="header" style="background-image: url(img/bg.jpg);"> <div class="main-container"> <nav> <div class="logo">logo</div> <ul class="menu"> <li><a href="">Home</a></li> <li><a href="">About</a></li> <li><a href="">Services</a></li> <li><a href="">Contact</a></li> </ul> </nav> </div> </header> I thought as an option to make one more block for the mobile version, with another picture hide and show another.
How to do? Throw an idea.