/* 通配符选择器 */ * { margin: 0; padding: 0; } /* 标签选择器 */ h1 { width: 960px; height: 40px; margin: 5px auto; } /* 类选择器 */ .a { background-color: red; } .b { background-color: orange; } .c { background-color: yellow; } .d { background-color: green; } .e { background-color: cyan; } .f { background-color: blue; } .g { background-color: purple; } .h { color: blue; text-align: center; width: 100px; height: 38px; overflow: hidden; } .big { font-size: 32px; } .normal { font-size: 18px; } .small { font-size: 12px; } /* ID选择器 */ #header, #footer { width: 800px; height: 120px; border: 1px solid red; margin: 10px auto; }