CSS box model Box model

Properties: content, padding, border, margin, CSS box mode all have these properties.

   CSS box model is a kind of thinking model used by CSS technology often used in web design.

Classification of boxes: different types of boxes produced by different elements may be different. What kind of box an element produces depends on its CSS display property

display:none: no generation Box

display:inline: line box

display:block: block box

Box composition:

Margin(outside Margin)-Clear the area outside the border, the outer margin is transparent.

Border-A border around the inner margin and outside the content.

Padding (inner margin)-Clear the area around the content, the inner margin is transparent.

Content-The content of the box, displaying text and images.

Example:

div {
width: 300px;
border: 25px solid green;
padding : 25px;
margin: 25 px;
}
span>
span>

Leave a Comment

Your email address will not be published.