简体   繁体   English

在桌面和移动设备的页面上设置不同的字体大小

[英]Setting different font sizes on page for desktop and mobile

My site uses an out-of-the-box responsive theme: "Lawetique."我的网站使用开箱即用的响应式主题:“Lawetique”。

The font looks lousy on my desktop PC.字体在我的台式电脑上看起来很糟糕。 The text is thin and narrow.文字又细又窄。 But it looks great on a phone.但它在手机上看起来很棒。 The narrow typeface suits the vertical orientation, and it's just the right size.窄字体适合垂直方向,大小正好。

It would look much better on the desktop if it was just larger, but I don't know how to make the font scale larger for PC without making it look cartoonish on mobiles.如果它只是更大的话,它在桌面上看起来会更好,但我不知道如何在不让它在手机上看起来卡通化的情况下让 PC 的字体比例更大。

I'm OK at CSS but clueless on device control.我对 CSS 没问题,但对设备控制一无所知。 Any help is sincerely appreciated!真诚感谢任何帮助!

 /* mobile styles first */ body { font-size: 16px; } /* tablet styles */ @media screen and (min-width: 768px) { body { font-size: 20px; } } /* desktop styles */ @media screen and (min-width: 1024px) { body { font-size: 24px; } }

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

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