为什么字体大小不会随着浏览器放大而改变? [英] Why the font size won't change with browser zoom in?
问题描述
在大多数网站中,当我改变浏览器的缩放级别时,字体大小也会增加并帮助用户看到它们.由于某些原因,这在我的新网站上不起作用.当我更改浏览器的缩放级别时,一切都会发生变化,但所有字体大小都保持不变.是否有可用于控制此行为的 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
这是一个例子:http://ca.skywatcher.com/index.php
推荐答案
问题是你在layout中为body设置了
.将其更改为 -webkit-text-size-adjust: none;
.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
这篇关于为什么字体大小不会随着浏览器放大而改变?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!