Today I have learned Image responsive in moblie view and web view in javascript

  Image responsive in moblie view and web view in javascript:

What are responsive images in HTML?

  • Responsive images in HTML are images that automatically adjust their size based on the size of the screen or the container they are displayed in, providing an optimal viewing experience on different devices with varying screen sizes.
  • Why is image responsiveness important?

    • In today’s digital age, having an image responsive website has become essential to provide a seamless browsing experience for users across all devices. Image responsiveness ensures that your images adapt to the device’s screen size and resolution, maintaining their quality and proportion.
    •   @media all and (max-width: 4900px) {
          .nature {
            width: 100%;
          }
        }
        @media all and (max-width: 3849px) {
          .nature {
            width: 80%;
          }

        }
        @media all and (max-width: 2349px) {
          .nature {
            width: 70%;
          }

        }
        @media all and (max-width: 2144px) {
          .nature {
            width:  60%;
          }


         

        }
        @media all and (max-width: 1991px) {
      .nature {
        width: 50%;
        }

        }
        @media all and (max-width: 1715px) {
      .nature {
        width: 40%;
      }

        }
        @media all and (max-width: 1588px) {
          .nature {
            width: 30%;
          }
        }
          @media all and (max-width: 1515px) {
            .nature {
              width: 20%;
            }
          }
          @media all and (max-width: 900px) {


            .nature {
              width: 50%;
             

            }
          }
    • Output:




Comments

Popular posts from this blog

Building a Full-Stack Student Management System with React.js and NestJS

Today I have solved the problem in javascript

Today I have solved problem in javascript