Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to initialize Css spacing

Shulou Source: shulou.com Published: 2022-06-01 15:05:10 10月03日 Update

This article mainly explains "how to initialize Css spacing". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to initialize Css spacing.

Rough initialization:

* {margin:0;padding:0;border:0px none;}

Optimize initialization:

/ * css reset code * /

/ * text size initialization, so that 1em=10px * /

Body {

Font-size:62.5%

} / * for IE/Win * /

Html > body {

Font-size:10px

} / * for everything else * /

/ * initialize font borders, etc. * /

Body,div,dl,dt,dd,ul,ol,li,h2,h3,h4,h5,h6,h7,pre,form,fieldset,input,textarea,p,blockquote,th,td {

Padding: 0

Margin: 0

}

Table {

Border-collapse: collapse

Border-spacing: 0

}

Fieldset,img {

Border: 0

}

Img {

Display:block

}

Address,caption,cite,code,dfn,th,var {

Font-weight: normal

Font-style: normal

}

Ol,ul {

List-style: none

}

Caption,th {

Text-align: left

}

H2,h3,h4,h5,h6,h7 {

Font-weight: normal

Font-size: 100%

}

Q:before,q:after {

Content:''

}

Abbr,acronym {border: 0

}

A {

Text-decoration:none

}

At this point, I believe you have a deeper understanding of "how to initialize Css spacing". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Spacing content learning practical deeper rough interest size font practicality practical simple operation text method more friends website frame channel query Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Shulou Tech Info Redmi NVidia Apple