2010-06-16 69 views
2

我刚才标准化字体大小与此:HTML:标题标签的百分比是多少?

html, body, div, span, applet, object, iframe, 
h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
a, abbr, acronym, address, big, cite, code, 
del, dfn, em, font, img, ins, kbd, q, s, samp, 
small, strike, strong, sub, sup, tt, var, 
b, u, i, center, 
dl, dt, dd, ol, ul, li, 
fieldset, form, label, legend, 
table, caption, tbody, tfoot, thead, tr, th, td { 
margin: 0; 
padding: 0; 
border: 0; 
outline: 0; 
font-size: 100%; 
vertical-align: baseline; 
background: transparent; 
} 

现在我想调整标题标签给予百分比至<h1>, <h2>。像这样:

h1 {font-size: 2em; margin: .67em 0;} 
h2 {font-size: 180%; margin: .83em 0;} 
h3 {font-size: 1.17em; margin: 1em 0;} 
h4 {font-size: 1em; margin: 1.33em 0;} 
h5 {font-size: .83em; line-height: 1.17em; margin: 1.67em 0;} 
h6 {font-size: .67em; margin: 2.33em 0;} 
h1, h2, h3, h4, h5, h6 {font-weight: bolder;} 

正如你所看到的,我给了h2的百分比,但其余的百分比是多少?

+1

您只需要在body,div,input中设置字体样式,剩下的将继承这些元素。似乎你应用了很多不需要应用的样式。此外,中心元素已被弃用,你根本不应该使用它。 – animuson 2010-06-16 17:02:00

回答

0

的百分比可以是你想他们是什么。没有什么说H1必须比H2更大,这只是默认设置。

+0

的确如此,但似乎user248959想遵循某种规则,并且为此,转换表很好;) – Zuul 2010-06-16 17:31:31