one. But the problem is, my image is too big, so the scrollbars appear. Image resolution is 1920x1280 and mine screen is 1366x768. I want to make a responsive background image.
                  
                  
                  Here is the part of the code in html:
                  
                  
                  ...
                  
                  
                  <body>
                  
                  
                      <img src="city.jpg">
                  
                  
                  </body>
                  
                  
                  ...
                  
                  
                  and here is the css code:
                  
                  
                  body img {
                  
                  
                      background-image: url(city.jpg);
                  
                  
                      background-position: center center;
                  
                  
                      background-repeat: no-repeat;
                  
                  
                      background-attachment: fixed;
                  
                  
                      background-size: cover;
                  
                  
                      background-color: #464646;
                  
                  
                  }
                  
                  
                  How to make my image responsive?
                  
                  
                
Set the background property of body to the image. Exclude the actual img tag
Обсуждают сегодня