How do you specify a specific resolution in the @media rule, and not just the width of the window? I want to adapt for individual devices, but I can not understand how

    1 answer 1

    In most cases, such options (from Bootstrap'a):

    // Самые маленькие устройства (portrait phones, less than 576px) @media (max-width: 575.98px) { ... } // Маленькие устройства (landscape phones, less than 768px) @media (max-width: 767.98px) { ... } // Средние устройства (tablets, less than 992px) @media (max-width: 991.98px) { ... } // Большие устройства (desktops, less than 1200px) @media (max-width: 1199.98px) { ... } 

    Or another such option (if you need some particular one, it will fit more):

     // Самые маленькие устройства (portrait phones, less than 576px) @media (max-width: 575.98px) { ... } // Маленькие устройства (landscape phones, 576px and up) @media (min-width: 576px) and (max-width: 767.98px) { ... } // Средние устройства (tablets, 768px and up) @media (min-width: 768px) and (max-width: 991.98px) { ... } // Большие устройства (desktops, 992px and up) @media (min-width: 992px) and (max-width: 1199.98px) { ... } // Самые большие устройства (large desktops, 1200px and up) @media (min-width: 1200px) { ... } 

    In head add:

     <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> 

    In fact, a huge amount of options, depending on the device, You can find it here.

    • Thank you very much. what you need - ExzoTikFruiT