HTML中的H1-H6字体大小 [英] H1-H6 font sizes in HTML

查看:618
本文介绍了HTML中的H1-H6字体大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在HTML中(我想应该是在一般的排版中),H1-H6元素似乎有一些定义的大小.

In HTML (and in typography in general, I suppose), there appears to be some defined sizes for H1-H6 -elements.

即,如果基线字体大小为16px(或100%),则h1(w/c)应为2.25em(36px). 并且H2(w/c)应该是1.5em(24px).等等. 这些变量从何而来?即,H1 = 36px,H2 = 24px,H3 = 21px,H4 = 18px,H5 = 16px,H6 = 14px. (或者,如果您愿意的话,H1 = 2em,H2 = 1.5em,H3 = 1.17em等),那不是数字本身,而是它们之间的关系)

Ie., if the baseline font size is 16px (or 100%), then h1 (w/c)ould be 2.25em (36px). And H2 (w/c)ould be 1.5em (24px). Et cetera. Where do these variables come from? The H1=36px, H2=24px, H3=21px, H4=18px, H5=16px, H6=14px, that is. (or, if you like, H1=2em, H2=1.5em, H3=1.17em, etc., the point isn't the numbers themselves, but the relation between them)

他们有一些数学公式吗?它与黄金比率或斐波那契有关吗?我还没有找到有关此方面的信息.

Is there some mathematical formula for them? Does it have something to do with golden ratio or fibonacci? I haven't been able to find information on this.

更具体地说,模式是什么;为什么它从36变为24到21,或者为什么从36开始(或者,如果您愿意,从2em到1.5em到1.17em,等等)?

to be more specific, what is the pattern; why does it go from 36 to 24 to 21, or start from 36 to begin with (or, if you like, from 2em to 1.5em to 1.17em, etc.)?

哦,我忘了指出原始数字的来源,它们来自这里

Oh, I forgot to specify where I came up with the original numbers, they're from here

推荐答案

我知道这篇文章很旧.我遇到了同样的问题,他们从哪里得到这个问题.我想我找到了.

I know this post is old. I came across it with the same question, where do they get this from. I think I found it.

这是五音阶音阶的派生.无论如何,类型比例尺.标题取自类型"比例,尽管不是以1:1的顺序排列.

It is a derivation of a pentatonic music scale. The Type scale is anyway. The Headings are taken from the Type scale, though not in a 1:1 order.

规模为: 8 9 10 12 14 16 18 21 24 ...标尺以5步(12至24)倍增.每一步都是i(step)的幂乘以2(scale ['it doubles'])的基数(12)除以5(ttl个steps)['i/5']的整数-四舍五入到最接近的值.

The scale goes: 8 9 10 12 14 16 18 21 24... The scale doubles in 5 steps (12 to 24). Each step is the base(12) times 2(the scale['it doubles']) to the power of i(step) divided by 5(ttl steps)['i/5'] - rounded to the nearest.

因此,h4是基数,h3是步骤1,h2是步骤3,h1是步骤5,或者五音阶的12的八进制. h5和h6反之亦然,相距1步和3步.如果我理解这一点,那将等同于E大和弦.

So h4 is the base, h3 is step 1, h2 is step 3, and h1 is step 5, or the octive of 12 on a pentatonic scale. h5 and h6 are 1 and 3 steps from base the other way.If I understand this, it would be the equivalent of a, E major chord.

我花了大约2个小时才弄明白一个电子表格和音阶的解释.

That took me about 2 hours to figure out with a spreadsheet and an explanation of musical scales.

这篇关于HTML中的H1-H6字体大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆