HTML:字體大小顯示了不同的標題
<h1>The Repository For Your Photos.</h1>
<h2>The Repository For Your Photos.</h2>
<h3>The Repository For Your Photos.</h3>
<h4>The Repository For Your Photos.</h4>
CSS復位:
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, 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, article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
font-family: "Myriad Set Pro", "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif;
}
結果:https://jsfiddle.net/h8wcL2cr/2/
爲什麼他們都一樣嗎?
因爲'font-size:100%' – Hatchet
它們是相同的,因爲你所有的'100%'都是相對於由jsfiddle設置的14px的正文字體大小 –