As soon as upon a time, I had a web site the place it appeared nice on laptop computer, however after I switched to telephone, the textual content was SO TINY!!!.
So I began messing round with @media
queries and located them a bit too laborious to make use of.
Then I searched my downside in Google and located this StackOverflow publish.
It had the reply to my downside!
The reply is fairly easy truly. You utilize the calc()
operate in CSS, and use rem
and vmin
items to put in writing this code:
physique {
font-size: calc(0.75em + 1vmin);
}
I made responsive textual content with simply 3 strains of CSS and with out @media
queries!