Answer the question
In order to leave comments, you need to log in
Media queries behave in a strange way, why is that?
Friends, why do media queries behave in a strange way, or I misunderstand something. Help to understand, please!
The FIRST situation is as follows.
background-color: red;
@media (max-width: 1630px) {
background-color: green;
}
@media (max-width: 1024px) {
background-color: blue;
}
@media (max-width: 992px) {
background-color: yellow;
}
@media (max-width: 768px) {
background-color: aqua;
}
background-color: red;
@media (max-width: 1629px) {
background-color: green;
}
@media (max-width: 1023px) {
background-color: blue;
}
@media (max-width: 991px) {
background-color: yellow;
}
@media (max-width: 767px) {
background-color: aqua;
}
@media (max-width: 1024px) {
background-color: blue;
}
Answer the question
In order to leave comments, you need to log in
There are tales on the Internet about the formation of a gap of 1px between breakpoints, if both the max-width and min-width rules are applied for a given screen width and when the browser screen scaling is different from 100%. Check if you have a similar situation. The solution to the problem is on the same link.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question