如何防止移动设备缩放字体大小 [英] How to prevent mobile devices to scale font size
问题描述
在
您最有可能在寻找这个:
包含以下<$ c文档的< head>
部分中的$ c>< meta> 标签:
< meta name =viewportcontent =width = device-width,initial-scale = 1>
它帮助我解决了同样的问题。
On our website we have the following phenomenon: When rendering the website on a desktop browser (Firefox, IE, Chrome), all fonts, in particular those embedded in <td>
tags, are rendered in the same size.
However, when rendering the website on a mobile device, the font size of the texts within the <td>
tags shrinks. See below. We tried to set
html {
-webkit-text-size-adjust: none;
}
but this only helps with the problem on the mobile safari and opera browser. Using the tips from this website, we added
@media (max-width: 960px) {
td {
font-size: 20pt;
}
}
to the css, but this now miraculously only works for one of our phones held tilted sideways, not in portrait. How do we prevent the font-size within the table cells to be scaled down?
You were most likely looking for this:
Include the following <meta>
tag in the document's <head>
section:
<meta name="viewport" content="width=device-width, initial-scale=1">
It helped me with the same problem.
这篇关于如何防止移动设备缩放字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!