normalize.css

/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */

/**

* 1. Change the default font family in all browsers (opinionated).设置默认字体为无衬线字体。

* 2. Prevent adjustments of font size after orientation changes in IE and iOS.防止 iOS 和 IE 横屏时调整文本大小,不用none值禁止用户缩放。

*/

html{

font-family:sans-serif; /* 1 */

-ms-text-size-adjust:100%;/* 2 */

-webkit-text-size-adjust:100%;/* 2 */

}

/**

* Remove the margin in all browsers (opinionated).移除margin,针对所有浏览器(自定义)

*/

body{

margin:0;

}

/* HTML5 display definitions HTML5显示定义

========================================================================== */

/**

* Add the correct display in IE 9-.修正补充IE9-的显示方式

* 1. Add the correct display in Edge, IE, and Firefox.修正补充Edge, IE, and Firefox的显示方式

* 2. Add the correct display in IE.修正补充IE的显示方式

*/

article,

aside,

details,/* 1 */

figcaption,

figure,

footer,

header,

main,/* 2 */

menu,

nav,

section,

summary{ /* 1 */

display:block;

}

/**

* Add the correct display in IE 9-.修正补充IE9-的显示方式

*/

audio,

canvas,

progress,

video{

display:inline-block;

}

/**

* Add the correct display in iOS 4-7.修正补充iOS 4-7的显示方式

*/

audio:not([controls]){

display:none;

height:0;

}

/**

* Add the correct vertical alignment in Chrome, Firefox, and Opera.修正补充在Chrome, Firefox, 和Opera中的垂直对齐方式

*/

progress{

vertical-align:baseline;

}

/**

* Add the correct display in IE 10-.修正补充IE10-的显示方式

* 1. Add the correct display in IE.修正补充IE的显示方式

*/

template,/* 1 */

[hidden]{

display:none;

}

/* Links 链接

========================================================================== */

/**

* Remove the gray background on active links in IE 10.去掉 IE 10 链接激活时的灰色背景

*/

a{

background-color:transparent;

}

/**

* Remove the outline on focused links when they are also active or hovered

* in all browsers (opinionated).移除焦点链接active和hover时的轮廓线,针对所有浏览器(自定义)

*/

a:active,

a:hover{

outline-width:0;

}

/* Text-level semantics 文本语义

========================================================================== */

/**

* 1. Remove the bottom border in Firefox 39-.1. 移除在Firefox 39-下的下边框

* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 2. 修正补充在Chrome, Edge, IE, Opera, 和 Safari里的文本装饰线

*/

abbr[title]{

border-bottom:none; /* 1 */

text-decoration:underline; /* 2 */

text-decoration:underline dotted; /* 2 */

}

/**

* Prevent the duplicate application of `bolder` by the next rule in Safari 6. 下条规则避免在Safari 6中重复运用"bolder"

*/

b,

strong{

font-weight:inherit;

}

/**

* Add the correct font weight in Chrome, Edge, and Safari.在Chrome, Edge, and Safari中修正补充font weight

*/

b,

strong{

font-weight:bolder;

}

/**

* Add the correct font style in Android 4.3-.修正补充Android 4.3-里的font style

*/

dfn{

font-style:italic;

}

/**

* Correct the font size and margin on `h1` elements within `section` and

* `article` contexts in Chrome, Firefox, and Safari. 更正Chrome,Firefox,Safari浏览器下`section`和`article`节点内的h1的字体大小和margin

*/

h1{

font-size:2em;

margin:0.67em 0;

}

/**

* Add the correct background and color in IE 9-.修正补充 IE 9- 下的 background and color

*/

mark{

background-color:#ff0;

color:#000;

}

/**

* Add the correct font size in all browsers.针对所有浏览器修正补充font size

*/

small{

font-size:80%;

}

/**

* Prevent `sub` and `sup` elements from affecting the line height in

* all browsers.防止`sub` 和 `sup`元素影响行高,针对所有浏览器

*/

sub,

sup{

font-size:75%;

line-height:0;

position:relative;

vertical-align:baseline;

}

sub{

bottom:-0.25em;

}

sup{

top:-0.5em;

}

/* Embedded content 内嵌元素

========================================================================== */

/**

* Remove the border on images inside links in IE 10-.去除 IE 10- a 内部 img 元素默认的边框

*/

img{

border-style:none;

}

/**

* Hide the overflow in IE.修复 IE9 中的 overflow 的怪异表现

*/

svg:not(:root){

overflow:hidden;

}

/* Grouping content 群组元素

========================================================================== */

/**

* 1. Correct the inheritance and scaling of font size in all browsers.1. 纠正在所有浏览器的字体和字体大小的继承和缩放

* 2. Correct the odd `em` font sizing in all browsers.2.纠正在所有浏览器的‘em’字体大小

*/

code,

kbd,

pre,

samp{

font-family:monospace, monospace; /* 1 */

font-size:1em; /* 2 */

}

/**

* Add the correct margin in IE 8.修正补充IE8下的margin

*/

figure{

margin:1em 40px;

}

/**

* 1. Add the correct box sizing in Firefox.1.修正补充Firefox下的box-sizing

* 2. Show the overflow in Edge and IE.2.在Edge 和 IE下溢出显示

*/

hr{

box-sizing:content-box; /* 1 */

height:0; /* 1 */

overflow:visible; /* 2 */

}

/* Forms 表单

========================================================================== */

/**

* Change font properties to `inherit` in all browsers (opinionated).改字体属性为继承“inherit”,针对所有浏览器(自定义)

*/

button,

input,

select,

textarea{

font:inherit;

}

/**

* Restore the font weight unset by the previous rule.恢复font weight取消以前的规则

*/

optgroup{

font-weight:bold;

}

/**

* Show the overflow in IE.在IE下溢出显示

* 1. Show the overflow in Edge.1.在Edge下溢出显示

* 2. Show the overflow in Edge, Firefox, and IE.2.在Edge, Firefox, 和 IE下溢出显示

*/

button,

input,/* 1 */

select{ /* 2 */

overflow:visible;

}

/**

* Remove the margin in Safari.移除Safari下的margin

* 1. Remove the margin in Firefox and Safari.1.移除Safari和Firefox下的margin

*/

button,

input,

select,

textarea{ /* 1 */

margin:0;

}

/**

* Remove the inheritence of text transform in Edge, Firefox, and IE.移除在Edge, Firefox, 和 IE里的text-transform的继承

* 1. Remove the inheritence of text transform in Firefox.1.移除在Firefox里text-transform的继承

*/

button,

select{ /* 1 */

text-transform:none;

}

/**

* Change the cursor in all browsers (opinionated).改光标为手型,针对所有浏览器(自定义)

*/

button,

[type="button"],

[type="reset"],

[type="submit"]{

cursor:pointer;

}

/**

* Restore the default cursor to disabled elements unset by the previous rule.恢复disabled元素的默认光标,取消以前的规则。

*/

[disabled]{

cursor:default;

}

/**

* 1. Prevent a WebKit bug where (2) destroys native `audio` and `video`

* controls in Android 4.1. 防止WebKit的bug(2)破坏原生`audio‘和 `video ` 控制条,在安卓4的版本下

* 2. Correct the inability to style clickable types in iOS.2. 修正在IOS下不可点击的bug

*/

button,

html [type="button"],/* 1 */

[type="reset"],

[type="submit"]{

-webkit-appearance:button; /* 2 */

}

/**

* Remove the inner border and padding in Firefox.移除Firefox中的border和padding

*/

button::-moz-focus-inner,

input::-moz-focus-inner{

border:0;

padding:0;

}

/**

* Restore the focus styles unset by the previous rule.通过恢复以前的规则取消设置的focus样式。

*/

button:-moz-focusring,

input:-moz-focusring{

outline:1px dotted ButtonText;

}

/**

* Change the border, margin, and padding in all browsers (opinionated).更改border, margin, 和 padding,针对所有的浏览器(自定义)

*/

fieldset{

border:1px solid #c0c0c0;

margin:0 2px;

padding:0.35em 0.625em 0.75em;

}

/**

* 1. Correct the text wrapping in Edge and IE.1.更正Edge和IE中的文字换行。

* 2. Correct the color inheritance from `fieldset` elements in IE.2.纠正在IE浏览器`fieldset`元素的字体颜色继承。

* 3. Remove the padding so developers are not caught out when they zero out

* `fieldset` elements in all browsers.3. 移除padding针对所有浏览器

*/

legend{

box-sizing:border-box; /* 1 */

color:inherit; /* 2 */

display:table; /* 1 */

max-width:100%; /* 1 */

padding:0; /* 3 */

white-space:normal; /* 1 */

}

/**

* Remove the default vertical scrollbar in IE.移除IE浏览器中默认的垂直滚动条

*/

textarea{

overflow:auto;

}

/**

* 1. Add the correct box sizing in IE 10-.1.修正补充box sizing,在IE 10-浏览器

* 2. Remove the padding in IE 10-.2.移除padding在IE 10-浏览器

*/

[type="checkbox"],

[type="radio"]{

box-sizing:border-box; /* 1 */

padding:0; /* 2 */

}

/**

* Correct the cursor style of increment and decrement buttons in Chrome.纠正在Chrome递增和递减按钮光标样式

*/

[type="number"]::-webkit-inner-spin-button,

[type="number"]::-webkit-outer-spin-button{

height:auto;

}

/**

* Correct the odd appearance of search inputs in Chrome and Safari.更正search在Chrome和Safari古怪的样子

*/

[type="search"]{

-webkit-appearance:textfield;

}

/**

* Remove the inner padding and cancel buttons in Chrome on OS X and

* Safari on OS X.移除padding和取消按钮在Chrome OS X 和 Safari OS X。

*/

[type="search"]::-webkit-search-cancel-button,

[type="search"]::-webkit-search-decoration{

-webkit-appearance:none;

}

压缩版:

/*! normalize.css v4.0.0 | MIT License | github.com/necolas/normalize.css */

html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}

body{margin:0}

article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}

audio,canvas,progress,video{display:inline-block}

audio:not([controls]){display:none;height:0}

progress{vertical-align:baseline}

[hidden],template{display:none}

a{background-color:transparent}

a:active,a:hover{outline-width:0}

abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}

b,strong{font-weight:inherit;font-weight:bolder}

dfn{font-style:italic}

h1{margin:.67em 0;font-size:2em}

mark{background-color:#ff0;color:#000}

small{font-size:80%}

sub,sup{position:relative;vertical-align:baseline;font-size:75%;line-height:0}

sub{bottom:-.25em}

sup{top:-.5em}

img{border-style:none}

svg:not(:root){overflow:hidden}

code,kbd,pre,samp{font-size:1em;font-family:monospace}

figure{margin:1em 40px}

hr{overflow:visible;box-sizing:content-box;height:0}

button,input,select,textarea{font:inherit}

optgroup{font-weight:700}

button,input,select{overflow:visible}

button,input,select,textarea{margin:0}

button,select{text-transform:none}

[type=button],[type=reset],[type=submit],button{cursor:pointer}

[disabled]{cursor:default}

[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}

button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}

button:-moz-focusring,input:-moz-focusring{outline:1px dotted ButtonText}

fieldset{margin:0 2px;padding:.35em .625em .75em;border:1px solid silver}

legend{display:table;box-sizing:border-box;padding:0;max-width:100%;color:inherit;white-space:normal}

textarea{overflow:auto}

[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}

[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}

[type=search]{-webkit-appearance:textfield}

[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,233评论 4 360
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,013评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,030评论 0 241
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,827评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,221评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,542评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,814评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,513评论 0 198
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,225评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,497评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 31,998评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,342评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,986评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,055评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,812评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,560评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,461评论 2 266

推荐阅读更多精彩内容