/* 内外边距通常让各个浏览器样式的表现位置不同 */
body, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, hr, button, article, aside, details, figcaption, figure, footer, header, menu, nav, section {
  margin: 0;
  padding: 0;
}

/* 重设 HTML5 标签, IE 需要在 js 中 createElement(TAG) */
article, aside, details, figcaption, figure, footer, header, menu, nav, section, summary {
  display: block;
}

/* HTML5 媒体文件跟 img 保持一致 */
audio, canvas, video {
  display: inline-block;
}

/* 要注意表单元素并不继承父级 font 的问题 */
button, input, select, textarea {
  margin: 0;
  color: inherit;
  font-size: 100%;
  font-family: inherit;
  line-height: 1.15;
}

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

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

/* 去掉各Table cell 的边距并让其边重合 */
table {
  border-spacing: 0;
  border-collapse: collapse;
}

/* 去除默认边框 */
fieldset, img {
  border: 0;
}

/* 块/段落引用 */
blockquote {
  position: relative;
  margin: 1em 3em 1em 2em;
  padding-left: 1em;
  border-left: 1px solid #1abc9c;
  color: #999;
  font-weight: 400;
}

@media only screen and (max-width: 640px) {
  blockquote {
    margin: 1em 0;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-weight: normal;
  font-size: 100%;
}

/* Firefox 以外，元素没有下划线，需添加 */
acronym, abbr {
  border-bottom: 1px dotted;
  text-decoration: none;
  font-variant: normal;
}

/* 添加鼠标问号，进一步确保应用的语义是正确的（要知道，交互他们也有洁癖，如果你不去掉，那得多花点口舌） */
abbr {
  cursor: help;
}

/* 一致的 del 样式 */
del {
  text-decoration: line-through;
}

address, caption, cite, code, dfn, em, th, var {
  font-weight: 400;
  font-style: normal;
}

/* 去掉列表前的标识, li 会继承，大部分网站通常用列表来很多内容，所以应该当去 */
ul, ol {
  list-style: none;
}

/* 对齐是排版最重要的因素, 别让什么都居中 */
caption, th {
  text-align: left;
}

q:before, q:after {
  content: '';
}

/* 统一上标和下标 */
sub, sup {
  position: relative;
  font-size: 75%;
  line-height: 0;
}

:root sub, :root sup {
  vertical-align: baseline; /* for ie9 and other modern browsers */
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

a {
  background-color: transparent;
  color: inherit;
}

/* 默认不显示下划线，保持页面简洁 */
ins, a {
  text-decoration: none;
}

/* 标记，类似于手写的荧光笔的作用 */
mark {
  margin: 0 5px;
  padding: 2px;
  border-bottom: 1px solid #ffedce;
  background: #fffdd1;
}

/* 代码片断 */
pre, code, pre tt {
  font-family: Courier, 'Courier New', monospace;
}

pre {
  display: block;
  padding: 1em 1.5em;
  border: 1px solid #ddd;
  background: #f8f8f8;
  -webkit-overflow-scrolling: touch;
}

/* 一致化 horizontal rule */
hr {
  margin-bottom: 0.8em;
  height: 10px;
  border: none;
  border-bottom: 1px solid #cfcfcf;
}

/* 底部印刷体、版本等标记 */
small, figcaption {
  font-size: 0.8em;
}

strong, b {
  font-weight: bolder;
}

img {
  border-style: none;
}

img, video {
  max-width: 100%;
  height: auto;
}

iframe {
  border: 0;
}

table {
  border-spacing: 0;
  border-collapse: collapse;
}

td, th {
  padding: 0;
  text-align: left;
}

template {
  display: none;
}

/* 可拖动文件添加拖动手势 */
[draggable] {
  cursor: move;
}

.clearfix:before, .clearfix:after {
  display: table;
  content: '';
}

.clearfix:after {
  clear: both;
}

.clearfix {
  zoom: 1;
}

/* 强制文本换行 */
.textwrap, .textwrap td, .textwrap th {
  word-wrap: break-word;
  word-break: break-all;
}

.textwrap-table {
  table-layout: fixed;
}

.text-elip {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* 提供 serif 版本的字体设置: iOS 下中文自动 fallback 到 sans-serif */
.serif {
  font-family: Palatino, Optima, Georgia, serif;
}

[hidden] {
  display: none;
}
