Answer the question
In order to leave comments, you need to log in
How to account for most smartphone screens using @media css3?
I'm making a mobile app using Cordova and there was a misunderstanding with CSS media queries.
Trying to make the application look the same on most devices, at some point I realized that I was writing a media query separately for each test device (now I have XIAOMI Redmi Note 3, XIAOMI Redmi 3S, Huawei ATH-UL01, Huawei KII-L21 at hand , HTC One).
The first thing that is not clear is that
@media screen and (device-width: 360px) and (min-device-height: 540px) and (-webkit-device-pixel-ratio: 3) {
}
Answer the question
In order to leave comments, you need to log in
You specified the exact width and height in the example, no one does that for sure.
v4-alpha.getbootstrap.com/layout/overview
Bootstrap media
queries - they are handy
For responsive typography
font-size: calc(1rem + 1.23vw);
The font size is tied to the screen width, and 1rem limits the minimum size.
I recommend reading this article very carefully: The 100% Correct Way to Breakpoints in CSS
It answers all questions and describes the most logical and correct approach to media queries.
Your approach is fundamentally wrong, you need to make a rubber layout and the placement of breakpoints depends only on the content component, but not the environment
Bootstrap4 also has down and up directions in breakpoints:
.hidden-xs-down
.hidden-sm-down
.hidden-xl-up
Here is more about the segmentation rubber layout.
And the rest: rem + v*
But I'm increasingly coming to the conclusion that the font size must be specified in absolute units, such as mm.
Devices are getting bigger and bigger. Each one displays differently. And it is difficult with the font, it must be of a certain size that can be read normally. Simply put, pure physics works.
In general, I believe that devices should not be certified if they cannot correctly display physical dimensions. I understand that there may be an error, but small, within 1-2 pixels per 10 cm.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question