What are some CSS properties possible? With JS, I imagine how some sort of if экран_широкий { свойства; } else { свойства_для телефонов; } if экран_широкий { свойства; } else { свойства_для телефонов; } if экран_широкий { свойства; } else { свойства_для телефонов; } , well, like that. But as far as I know in css there is no such thing. Due to what effect is achieved, that when you change the width of the browser, the properties suddenly start to be taken from xs and not from md for example, and container starts to stretch to full screen?

    2 answers 2

    In the bootstrap adaptability is achieved through media queries. They are written in css styles. The appearance of the page directly depends on the width of the browser window, including the width of the browser window of the device. Since the widths for phones, tablets and monitors are most often in the same range, they are only divided by size. Here, for example, the default properties of the bootstrap mesh 3

    bootstrap 3 grid options

    or here in the 4th breakpoints also with the help of media queries, this is how it looks inside css:

    bootstrap 4 responsive breakpoints

      Media ask

      eg:

        @media (max-width: 600px){ какойто селектор { название свойства: значение свойства; } }