[CSS] CSS practice-CSS Reset

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.