Tablet's scaling my web page by 1.5x causing layout issues

烂漫一生 提交于 2019-12-09 07:40:35

I believe this is what you might be looking for

body * {-webkit-text-size-adjust: 100%; }

read here for the documentations https://developer.mozilla.org/en-US/docs/Web/CSS/text-size-adjust

You're falling victim to the CSS pixel ratio: http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density of your device. Each device has a scaling factor applied to css. For example, the ipad mini is a ratio of 2.

There are ways to query the ratio in CSS, but it is not recommended according to Mozilla.

https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries#-moz-device-pixel-ratio

 @media (-webkit-min-device-pixel-ratio: 2), /* Webkit-based browsers */
   (min--moz-device-pixel-ratio: 2),    /* Older Firefox browsers (prior to Firefox 16) */
   (min-resolution: 2dppx),             /* The standard way */
   (min-resolution: 192dpi)             /* dppx fallback */ 
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!