Answer the question
In order to leave comments, you need to log in
Can you please explain the behavior of Media Queries?
There is this code:
@media (min-width: 320px) {
.container {
width: 1024px;
}
}
@media (min-width: 1024px) {
.container {
width: 1124px;
}
}
Answer the question
In order to leave comments, you need to log in
In general, I found the reason.
The reason was that on the tab on which I tested the project in the browser, the scale was set to 110%.
And it turns out that the scale affects the behavior of media queries and gives such behavior.
htmlbook.ru/css/value/media
https://habrahabr.ru/post/198292/
Your example
With the code
The width of the container, deliberately made smaller for clarity. Everything is working.
Are you confusing CSS PX WIDTH and DEVICE PX WIDTH ?
In order for your media queries to work, they must be loaded last, otherwise the default CSS will override them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question