/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */

/* Document
   ========================================================================== */

/**
 * 1. Correct the line height in all browsers.
 *    在所有浏览器中统一默认的行高。
 * 2. Prevent adjustments of font size after orientation changes in iOS.
 *    防止 iOS 旋转屏幕后自动调整字体大小。
 */
html {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
}

/* Sections
   ========================================================================== */

/**
 * Remove the margin in all browsers.
 * 在所有浏览器中移除 body 默认外边距。
 */
body {
  margin: 0;
}

/**
 * Render the `main` element consistently in IE.
 * 让 main 元素在 IE 中正常显示（IE 不认识 HTML5 标签）。
 */
main {
  display: block;
}

/**
 * Correct the font size and margin on `h1` elements within `section` and
 * `article` contexts in Chrome, Firefox, and Safari.
 * 修正 h1 在 section / article 中的默认字体和间距（不同浏览器差异较大）。
 */
h1 {
  font-size: 2em;
  margin: 0.67em 0;
}

/* Grouping content
   ========================================================================== */

/**
 * 1. Add the correct box sizing in Firefox.
 *    修正 Firefox 中 hr 的 box-sizing 行为。
 * 2. Show the overflow in Edge and IE.
 *    让 hr 在 Edge 和 IE 中正常显示溢出。
 */
hr {
  box-sizing: content-box; /* 1 */
  height: 0; /* 1 */
  overflow: visible; /* 2 */
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 *    修正 pre 标签的字体继承行为。
 * 2. Correct the odd `em` font sizing in all browsers.
 *    修正 pre 的 em 样式在部分浏览器的异常。
 */
pre {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/* Text-level semantics
   ========================================================================== */

/**
 * Remove the gray background on active links in IE 10.
 * 移除 IE10 中 a 标签激活状态的灰色背景。
 */
a {
  background-color: transparent;
}

/**
 * 1. Remove the bottom border in Chrome 57-
 *    移除旧版 Chrome (57-) 给 abbr 自动加的下边框。
 * 2. Add the correct text decoration in major browsers.
 *    各浏览器统一 abbr 的下划线样式。
 */
abbr[title] {
  border-bottom: none; /* 1 */
  text-decoration: underline; /* 2 */
  text-decoration: underline dotted; /* 2 */
}

/**
 * Add the correct font weight in Chrome, Edge, and Safari.
 * 让 b / strong 在所有浏览器中保持加粗一致。
 */
b,
strong {
  font-weight: bolder;
}

/**
 * 1. Correct the inheritance and scaling of font size in all browsers.
 *    修正 code / kbd / samp 的字体继承。
 * 2. Correct the odd `em` font sizing.
 *    修正部分浏览器中奇怪的 em 字体大小。
 */
code,
kbd,
samp {
  font-family: monospace, monospace; /* 1 */
  font-size: 1em; /* 2 */
}

/**
 * Add the correct font size in all browsers.
 * small 标签在不同浏览器默认大小不同，这里统一为 80%。
 */
small {
  font-size: 80%;
}

/**
 * Prevent `sub` and `sup` elements from affecting the line height.
 * 避免 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.
 * 移除 IE10 中 img 包含在 a 内部时的默认边框。
 */
img {
  border-style: none;
}

/* Forms
   ========================================================================== */

/**
 * 1. Change the font styles in all browsers.
 *    让所有表单元素继承字体（默认不继承）。
 * 2. Remove the margin in Firefox and Safari.
 *    移除默认外边距。
 */
button,
input,
optgroup,
select,
textarea {
  font-family: inherit; /* 1 */
  font-size: 100%; /* 1 */
  line-height: 1.15; /* 1 */
  margin: 0; /* 2 */
}

/**
 * Show the overflow in IE / Edge.
 * 让按钮在 IE 和 Edge 中正常显示溢出文本。
 */
button,
input {
  /* 1 */
  overflow: visible;
}

/**
 * Remove the inheritance of text transform.
 * 移除 Edge/Firefox/IE 对 button/select 继承 text-transform 的影响。
 */
button,
select {
  /* 1 */
  text-transform: none;
}

/**
 * Correct inability to style clickable types in iOS/Safari.
 * 让 iOS/Safari 中 button/submit 可正常被 CSS 美化。
 */
button,
[type='button'],
[type='reset'],
[type='submit'] {
  -webkit-appearance: button;
}

/**
 * Remove the inner border and padding in Firefox.
 * 移除 Firefox 中按钮的内边框与内边距（系统默认样式）。
 */
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
  border-style: none;
  padding: 0;
}

/**
 * Restore focus styles unset by the previous rule.
 * 恢复 Firefox 在按钮聚焦时的虚线边框。
 */
button:-moz-focusring,
[type='button']:-moz-focusring,
[type='reset']:-moz-focusring,
[type='submit']:-moz-focusring {
  outline: 1px dotted ButtonText;
}

/**
 * Correct the padding in Firefox.
 * 修正 Firefox 中 fieldset 的默认 padding。
 */
fieldset {
  padding: 0.35em 0.75em 0.625em;
}

/**
 * 修正：
 * 1. Edge/IE 中文本换行异常
 * 2. IE 中 fieldset 颜色继承异常
 * 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 */
}

/**
 * Add the correct vertical alignment.
 * 修正 progress 在不同浏览器中的 vertical-align 行为。
 */
progress {
  vertical-align: baseline;
}

/**
 * Remove default vertical scrollbar in IE 10+.
 * 移除 IE10+ 中 textarea 默认的垂直滚动条。
 */
textarea {
  overflow: auto;
}

/**
 * 修正：
 * 1. IE10 中 checkbox/radio 的 box-sizing
 * 2. IE10 中多余 padding
 */
[type='checkbox'],
[type='radio'] {
  box-sizing: border-box; /* 1 */
  padding: 0; /* 2 */
}

/**
 * Correct cursor style for number buttons.
 * 修正 Chrome 中 number 类型输入框的光标显示问题。
 */
[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
  height: auto;
}

/**
 * 修正搜索框：
 * 1. Chrome/Safari 外观异常
 * 2. Safari 轮廓偏移不正确
 */
[type='search'] {
  -webkit-appearance: textfield; /* 1 */
  outline-offset: -2px; /* 2 */
}

/**
 * 移除 macOS Chrome/Safari 搜索框内置装饰图标
 */
[type='search']::-webkit-search-decoration {
  -webkit-appearance: none;
}

/**
 * 让文件上传按钮在 Safari/iOS 中可样式化
 */
::-webkit-file-upload-button {
  -webkit-appearance: button; /* 1 */
  font: inherit; /* 2 */
}

/* Interactive
   ========================================================================== */

/*
 * 让 details / summary 在所有浏览器中显示正常。
 */
details {
  display: block;
}

summary {
  display: list-item;
}

/* Misc
   ========================================================================== */

/**
 * template 标签默认不可见，IE10 需要手动修复。
 */
template {
  display: none;
}

/**
 * [hidden] 属性在 IE10 中未实现，需要手动隐藏。
 */
[hidden] {
  display: none;
}
/*----------------------------- 初始化----------------------- */
/* 把我们所有标签的内外边距清零 */
* {
  margin: 0;
  border: 0;
  padding: 0;
  box-sizing: border-box; /* CSS3盒模型*/
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

img {
  display: block; /* 彻底解决图片  间隙问题 */
  max-width: 100%; /* 添加图片自适应 */
  height: auto; /* 保持比例 */
}

/* 移除下划线 */
a {
  text-decoration: none;
}

button,
input {
  /* "\5B8B\4F53" 就是宋体的意思 这样浏览器兼容性比较好 */
  font-family: Microsoft YaHei, Heiti SC, tahoma, arial, Hiragino Sans GB, '\5B8B\4F53', sans-serif;
  /* 默认有灰色边框我们需要手动去掉 */
  border: 0;
  outline: none;
}

/* 去掉li 的小圆点 */
li {
  list-style: none;
}

button {
  /* 当我们鼠标经过button 按钮的时候，鼠标变成小手 */
  cursor: pointer;
}
