简体   繁体   English

字体在台式机上亮,但在移动设备上不亮

[英]The font is ligher on desktop but not on mobile

I have this class on some of my texts .description {font-weight: lighter;font-size: 22px; } 我的一些课文上有此类.description {font-weight: lighter;font-size: 22px; } .description {font-weight: lighter;font-size: 22px; }

But the font-weight attribute works on desktop but not on mobile, why is that? 但是font-weight属性在台式机上有效,而在移动设备上无效,为什么呢?

When I scale chrome on my desktop to mobile size everything works fine, and the text is as light as it should be, but on mobile its not. 当我将台式机上的chrome缩放到移动设备尺寸时,一切都可以正常工作,并且文字应尽可能轻,但在移动设备上则不能。

It's working. 工作正常 The problem is that when you resize it to mobile it may seem as you have a bigger font. 问题是,当您将其调整大小到移动设备时,它看起来好像字体更大。 You may want to use responsive design so when the screen size is lower your font weight gets lower. 您可能需要使用响应式设计,因此,当屏幕尺寸较小时,字体粗细会减小。

.description {
font-weight: 500;font-size: 22px; 
}

@media screen and (max-width: 500px) {
    body {
        font-weight: 300;font-size: 22px; 
    }
}

Or something like that. 或类似的东西。 You can also set the font size lower and it may appear that your font weigth is lower too. 您还可以将字体大小设置得较低,并且看来字体的宽度也较小。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM