问题描述
在大多数网站中,当我更改浏览器的缩放级别时,字体大小也会增加,并帮助用户查看。由于某些原因,这不会在我的新网站上工作。当我改变浏览器的缩放级别,一切都改变,但所有的字体大小保持不变。有没有css或html属性,我可以用来控制这种行为?感谢
In most of websites, while I change the zoom level of browsers, the font size will also increase and help user to see them. For some reasons, that just won't work on my new website. While I change the zoom level of the browser, everything changes but all font size keep the same. Is there a css or html property that I can use to control this behavior? Thanks
这里是一个例子:
推荐答案
问题是你设置了 -webkit-text-size-adjust:none;
为 layout.css
中的正文。将其更改为 -webkit-text-size-adjust:auto;
允许随字体一起缩放字体。
The problem is that you have set -webkit-text-size-adjust: none;
for the body in layout.css
. Changing it to -webkit-text-size-adjust: auto;
allows the zooming of the fonts along with the page.
编辑:更正CSS。应为 auto
不 0
Corrected the CSS. Should be auto
not 0
这篇关于为什么浏览器放大时字体大小不会改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!