Overview
CSS reset is often used in web projects. So what is CSS reset. We know that different browsers have different default styles for HTML tags. For example, UL adopts an indent style by default. in IE, its indentation is implemented by margin, in Firefox, the indentation is implemented by padding. In actual development, the default style of the browser will bring me a lot of unexpected troubles. Eliminate these troubles-overwrite the default style of the browser from the beginning. This leads to the concept of CSS reset. CSS reset overwrites the default style provided by the browser.
CSS rest content
In the project, we often use the code for rest CSS.
View code 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;
Outline: 0;
Font-size: 100%;
Font: Inherit;
Vertical-align: baseline;
}
Article,
Aside,
Details,
Figcaption,
Figure,
Footer,
Header,
Hgroup,
Menu,
Nav,
Section
{
Display: block;
}
Body
{
Cursor: default;
Line-Height: 1;
}
OL,
Ul
{
List-style: none;
}
BLOCKQUOTE,
Q
{
Quotes: none;
}
BLOCKQUOTE: before,
BLOCKQUOTE: after,
Q: before,
Q: After
{
Content :'';
Content: none;
}
Table
{
Border-collapse: collapse;
Border-Spacing: 0;
}
Input,
Select
{
Vertical-align: middle;
}
CSS rest reference
A http://meyerweb.com/eric/thoughts/2007/04/12/reset-styles/ (reset styles)
The http://meyerweb.com/eric/thoughts/2007/04/14/reworked-reset/ (reworked reset)
Http://meyerweb.com/eric/tools/css/reset/index.html (CSS tools: reset CSS)
(If necessary, I can translate these articles)