默認情況下,每個瀏覽器都有自己的CSS。爲了解決這個問題,在應用自定義CSS之前,最好使用某種CSS標準化(正如@You指出的那樣)。 CSS標準化建議在徹底重置,因爲它
- 果脯使用默認值,不同於許多CSS重置。
- 規範各種元素的樣式。
- 糾正錯誤和常見的瀏覽器不一致。
來源:Normalize.css
另外,請檢查Initializr。它提供了再加上很多,包括IE6 +的兼容性/回退等
如果沒有,你可以使用基本的CSS重置,
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, 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%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
來源:http://meyerweb.com/eric/tools/css/reset/
你應該修復'background-color'css屬性,你忘了'#',它應該是'background-color:#0033dd' – Luis 2012-07-08 23:14:06