[CSS] How to prevent the font size from changing between portrait and landscape screens on smartphones, etc.
@naouniverse708 , and I've been trying to improve my site lately .
iPhone and Android browsers have a function that automatically adjusts the font size in both portrait mode and landscape mode, but at the moment it's not a very nice feature.
I would like to prevent the font size from changing, so I will leave a memorandum of how to deal with it below.
How to prevent font size from changing
Inside the element you want to specify,
-webkit-text-size-adjust: 100%;
It is OK if you add .
-webkit-text-size-adjust: none;
Although it is possible, it seems that it is not very good because the usability deteriorates.
The blog below will help you with this.
via: -webkit-text-size-adjust: Why you should never set none - Tekuni Blog
Afterword
Since this blog has separate HTML and CSS for PCs and smartphones, I think there is no problem with the latter, none, but considering the future, I think it would be better to write it at 100%.