2010-06-16 76 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