断点和字体大小混乱
我正在研究投资组合的媒体查询元素,其中断点的转换导致字体大小不同。例如 -
如果断点为1200px,那么EM将为75。那么,为什么字体大小为60%?
@media (max-width: 75em) {html {font-size: 60%;}}
I am working on a Media Query element of my portfolio where the breakpoint's conversion is leading to different font sizes. For example -
if the breakpoint is 1200px then the em would be 75. so why the font-size is 60%?
@media (max-width: 75em) {html {font-size: 60%;}}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您希望字体大小为75em,最高为1200px,则需要以下内容:
您已发布的示例意味着,断点为75em,而显示的字体大小设置为60%。没有完整的代码,绝对不可能说出这些数字会产生的尺寸,因为“ em”和“%”相对于根部尺寸。
If you want the font-size to be 75em up to 1200px, then you need this:
Your posted example means, that the breakpoint is at 75em and the font-size shown is set to 60%. Without the full code it is absolute not possible to say what sizes these numbers generate because 'em' and '%' are relative to the root-font-size.