Answer the question
In order to leave comments, you need to log in
Media is applied not on those values which are specified, a help?
In general, I completed the layout, sat down for adaptation, I write the first request, let's say
@media screen and (max-width: 1600px) {
body {
display: none;
}
}
Answer the question
In order to leave comments, you need to log in
Because according to your logic, it works at ANY width not more than 1600px, and 1280px is included in this category. Therefore, you must add a condition with min-width.
Secondly, media queries work in cascading order, so the order of the media queries in the CSS file is also important, in case you don't want to specify min-width. Each request will always override the previous one.
So max-width: 1600px is the maximum width! And the fact that at 1280, so there is a tablet!
write min-width: 1600px - this is from 1600 and more
According to the idea, it should be like this,
.css {
код десктоп
// тоесть выполняется всегда
}
@media (max-width: 1023px) {
.css {
код планшет
// выполняется если разрешение меньше 1023рх
}
}
@media (max-width: 767px) {
.css {
код мобила
// выполняется если разрешение меньше 767px
}
}
Check if there is page scaling in the browser or globally in the system
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question