HTML – 如何计算?

我注意到你可以使用1em,它在不同的网站上看起来会有所不同.

什么是em比例?

>使用的字体?
>最大的字体大小?
>页面宽度/高度?

解决方法

http://w3schools.com/cssref/css_units.asp

1em is equal to the current font size. 2em means 2 times the size of
the current font. E.g.,if an element is displayed with a font of 12
pt,then ‘2em’ is 24 pt. The ’em’ is a very useful unit in CSS,since
it can adapt automatically to the font that the reader uses

EM与其定义的当前元素相关.如果使用相对大小(如0.9em),它们会相乘并导致意外的尺寸.

现在,字体的认大小在浏览器之间不是标准的.在将字体设置为特定像素单元时,IE(至少是较旧的IE)存在问题. A good overview for font sizing can be found on A List Apart.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些