html在所有设备中保持相同的字符大小 [英] html keep same character size in all devices
问题描述
我使用多个输入按钮对HTML进行练习:
http://bullmalay.appspot .com /
我在手机上访问它。但我发现文字的大小真的很小。我认为原因是解决。
任何人都可以帮助我的文字大小?我想它可以在我的笔记本电脑上显示类似的大小。
ps。
我搜索过关于css:@media(min-width:702px)然后设置字体大小。但我认为即使一个小设备可以有一个高于我的笔记本电脑的分辨率。尺寸将小于它在我的笔记本电脑屏幕上显示。
我认为尺寸应该是:fontSize *(每像素的宽度我的笔记本电脑)/(该设备的每像素宽度)。但我不熟悉css。
I make an exercise about html with several input buttons:
http://bullmalay.appspot.com/
I visit it on my mobile. But I find the text size is really small. I think the reason is about resolution.
Can anyone help me about the text size? I want it can display the similar size in my laptop.
ps.
I have searched about css:@media (min-width: 702px) and then set the font size. But I think even a small device can have a resolution high than my laptop.The size will be smaller than it display on my laptop screen.
I think the size should be: fontSize * (width per pixel of my laptop)/(width per pixel of that device). But I am not familiar about css.
推荐答案
谢谢大家。我学到了很多。但我找到了自己的原因。
移动设备上的浏览器会自动缩放页面以适应移动屏幕。我只是添加这行到html,它的工作原理:
Thank you all. I have learned a lot. But I find the reason myself.
The browser on mobile device will auto scale the page to adapt the mobile screen. I just add this line to the html and it works:
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
这篇关于html在所有设备中保持相同的字符大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!