在响应式网络上工作时,我可以使用%或大众单元的字体尺寸吗?
我必须使用EM或REM单元中的字体尺寸吗?我不能使用%大众单元吗?
语音气泡的宽度为%单位,因此,如果浏览器尺寸减小,字体尺寸固定,则无法匹配语音气泡。因此,我将使用字体大小的大众单元。这是推荐的用法吗?还是如果可能的话,我们应该避免这样做?我应该使用EM或REM单元吗?
我使用了%单位,因此即使是100%,字母也太小。如果我使用大众单元,则字体大小准确出现,但是如果我使用大众单元,如果水平分辨率超过1920及更大,会出现问题吗?车身标签的最大宽度值是我创建的网站上的1920px。
Do I have to use the font size in em or rem units? Can't I use the %vw units?
The width of the speech bubble is % unit, so if the browser size decreases, the font size is fixed, it cannot match the speech bubble. So, I'm going to use vw unit of the font-size. Is this the recommended usage? Or should we avoid doing this if possible? Should I use em or rem units?
I used the % unit, so even if it's 100%, the letters are too small. If I use the vw unit, the font size comes out exactly, but if I use the vw unit, will there be a problem if the horizontal resolution is over 1920 and bigger? The max-width value of the body tag is 1920px on the site I make.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
百分比(%)为CSS字体大小:100%等于当前字体大小。这样想:50%是大于0.5倍(较小一半),而150%是字体大小的150%。
对于响应字体,您可以使用
Percent (%) as css font size: 100% is equal to the current font size. Think of it this way: 50% is 0.5 times larger ( half smaller ) and 150% is 150 percent of the font size.
For a responsive font you can use viewport width/height,
请参阅规范:
相对于视口尺寸的单位不支持。
See the specification:
Units relative to the viewport size are not supported.