參考網址:https://courses.hexschool.com/courses/666803/lectures/11948423
Eric Meyer Reset(經典版)
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;
}
/* 需額外加入 article, footer, header 等標籤的 block display 定義 */
Normalize.css(現代主流)
與其全部歸零,Normalize.css 保留了實用的瀏覽器預設值,同時修正各瀏覽器的不一致性,提供更好的開發體驗。 [1, 2]
- 使用方式:強烈建議直接載入 CDN 或 npm 安裝,無須手動複製整份。
-
CDN 連結:可至 cdnjs – normalize.css 取得最新版本並引入至
<head>。
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css" integrity="sha512-NhSC1YmyruXifcj/KFRWoC561YpHpc5Jtzgvbuzx5VozKpWvQ+4nXhPdFgmx8xqexRcpAglTj9sIBWINXa8x5w==" crossorigin="anonymous" referrerpolicy="no-referrer" />