css 未来的CSS硬重置
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了css 未来的CSS硬重置相关的知识,希望对你有一定的参考价值。
/*
Future CSS Hard Reset
Source: https://gist.github.com/gaintsev/ff039fe39f633d64178273537684292f
*/
html * {
all: initial;
cursor: default;
font-family: inherit;
font-weight: inherit;
text-align: inherit;
color: inherit;
visibility: inherit;
}
html {
/*Blocks*/
& html,
& body,
& div,
& map,
& dt,
& isindex,
& p,
& dl,
& dd,
& form,
& blockquote,
& blockquote[type=cite],
& address,
& h1,
& h2,
& h3,
& h4,
& h5,
& h6,
& pre,
& hr,
& article,
& aside,
& details,
& figcaption,
& figure,
& footer,
& header,
& main,,
& nav,
& section,
& summary,
& fieldset {
display: block;
}
/*Tables*/
& table {
display: table;
border-collapse: collapse;
}
& tr {
display: table-row;
}
& col {
display: table-column;
}
& colgroup {
display: table-column-group;
}
& tbody {
display: table-row-group;
}
& thead {
display: table-header-group;
}
& tfoot {
display: table-footer-group;
}
& th,
& td {
display: table-cell;
}
/*Lists */
& ul,
& ol {
display: block;
}
& li {
display: list-item;
}
/*Hidden elements*/
& area,
& base,
& basefont,
& head,
& meta,
& script,
& style,
& title,
& noembed,
& param {
display: none;
}
}
以上是关于css 未来的CSS硬重置的主要内容,如果未能解决你的问题,请参考以下文章
CSS CSS - Eric Meyers CSS重置
CSS 埃里克迈耶css重置和其他必要的CSS
前端创建新项目时重置css
css 基本的css全局重置
css 简单的Css重置
css 一个微小的现代CSS重置