有許多 Browsers,不同 Browser 內定的樣式表都有其預設值,在設計網頁時,對於不同 Browsers 之間,可能就需要為不同 Browsers 設計不同的 CSS ,這樣讓網頁設計者相當困擾,一般的做法是將不同 Browsers 內定的樣式表預設值 Reset,Reset 之後才設計元件的 CSS,這樣設計出來的 CSS,使用不同 Browsers 觀看,就會有相同的效果。 目前網路上常被使用 Reset 樣式表預設值的套件有: Normalize.css makes browsers render all elements more consistently and in line with modern standards. CSS Reset HTML5 Reset Stylesheet 樣式表有優先順序,其寫法上的優先順序為:[1] Client user defined style Embedded or inline style sheet Internal style sheet External style sheet Browser default style(Client User browser) 按照 CSS Selector 來區別優先順序,在 CSS 2.1 Section 6.4.3 :[2]中寫道: A selector's specificity is calculated as follows: count 1 if the declaration is from is a 'style' attribute rather than a rule with a selector, 0 otherwise (= a) (In HTML, values of an element's "style" attribute are style sheet rules. These rules have no selectors, so a=1, b=0, c=0, and d=0.) count the number of ID attributes in the selector (= b) coun...